about django documentation

2021-01-19 Thread a a
how can i understand from documentation? i was ended the introduction then i have continue to models but how can i implementation? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from i

about django documentation

2021-01-19 Thread a a
i have end the django introduction but i do not know where continue i was start with models but there are error in terminal NameError: name 'Person' is not defined this is link: https://docs.djangoproject.com/en/3.1/topics/db/models/ -- You received this message because you are subscribed to th

Django Installation Issue on Shared Hositng

2008-05-27 Thread A
I am have some issues setting up Django on shared web hosting. I have searched around and tried a few fixes as posted to no avail. Linux hosting environment. I get the following error message: Traceback (most recent call last): File "", line 1, in ? ImportError: No module named

Re: Django Installation Issue on Shared Hositng

2008-05-28 Thread A
Thanks for the assistance. A On May 28, 3:46 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi > > On May 28, 3:08 am, A <[EMAIL PROTECTED]> wrote: > > > I am have some issues setting up Django on shared web hosting. I have > > searched arou

Re: import opml file

2006-09-29 Thread a
:-) > > --Jon > > On 9/23/06, a <[EMAIL PROTECTED]> wrote: > > is there an easy way to upload opml files > > thanks > > Jon Atkinson wrote: > > > I've found that using XMLObject > > > (http://www.freenet.org.nz/python/xmlobject/) is a simple w

Re: anyone see this problem in psycopg2 i m unable to debug this

2006-09-29 Thread a
this sounds serious how do we implement rollbacks i use postgres 8.1 thanks Anil Eric Walstad wrote: > anil wrote: > > psycopg2.ProgrammingError : current transaction is aborted, commands > > ignored until end of transaction block > > Anil, > > I get these errors when

I tried running inspectdb TypeError: int() argument must be a string or a number

2006-10-09 Thread a
django/db/backends/postgresql_psycopg2/introspection.py", line 35, in get_relations relations[int(row[0][1:-1]) - 1] = (int(row[1][1:-1]) - 1, row[2]) TypeError: int() argument must be a string or a number I m trying to import these legacy databases into the dbadmin system of django thanks for any h

legacy db import problems

2006-10-15 Thread a
/lib/python2.4/site-packages/django/db/backends/postgresql_psycopg2/introspection.py", line 35, in get_relations relations[int(row[0][1:-1]) - 1] = (int(row[1][1:-1]) - 1, row[2]) TypeError: int() argument must be a string or a number --~--~-~--~~~---~--~

Highload website database architecture

2006-12-01 Thread a
Hi, I am building a web app backed by database postgresql and currently the site is under a humongous torrent of hits. I have a question regarding the database backend config. The database folder has a file called postgresql.cons where we can specify no of active connections to the database -N

Reg admin

2006-05-07 Thread a
do this i get the foll error, i m unable to create a superuser or admin and didnt ask me to create admin Traceback (most recent call last): File "/usr/bin/django-admin.py", line 5, in ? pkg_resources.run_script('Django==0.91', ' django-admin.py') File &qu

starting lighthttpd

2006-05-07 Thread a
[EMAIL PROTECTED] ~]$ /etc/init.d/lighttpd start Starting lighttpd: 2006-05-07 16:49:18: (network.c.300) can't bind to port: 80 Permission denied [FAILED] i m not able to start as a normal user how do i start

using lighty and fastcgi - obsolete main and admin

2006-05-07 Thread a
--maxspare=2 --daemon >From django user: Ah, I see now. Hugo wrote his manual long time ago when admin was a separate web application, which should be launched independently from a main application. Hence myproject.settings.main and myproject.settings.admin. While it is clearly obsolete,

preparing rss feed

2006-08-01 Thread a
preparing rss feeds i hav a table in postgres and it has title and body columns, i want to create a rss file on the fly when this table is updated wat is the best way to get it done thanks a lot --~--~-~--~~~---~--~~ You received this message because you are

Best way to construct an email - attach a html file and send

2006-08-09 Thread a
What is the best way to construct an email in python and also attach a html file the html file to be attached is not on disk, but should be dynamically constructed in the python script I want to attach the django debug error to an email and mail it to myself whenever there is an error in the

what happens when id overflows for db tables...

2006-08-09 Thread a
in the db, id is an int4 and it is incremented everytime a new insert is done, deleted ids arent used, so if id overflows its limit what happens, how do we handle this --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

psycopg2

2006-08-09 Thread a
how to use django with psycopg2? anyone tried it --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this gro

db already exists can i use the CRUD admin interface

2006-08-09 Thread a
i already have the db in postgres not one in fact several is there an easy way to do the admin interface for these tables using Django thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. T

i tried this - class meta, db_table = 'ref'

2006-08-09 Thread a
class Ref(models.Model): class META: db_table='ref' admin = meta.Admin( list_display = ('subject', 'body', 'email', 'neighborhood', 'address', 'created'), ) class Admin: pass list_display = ('subject', 'body', 'email', 'neighborhood', 'add

trying to migrate existing db using inspectdb

2006-08-09 Thread a
"from django core import meta" doesnt work django-admin.py inspectdb newdb Traceback (most recent call last): File "/home/mark/bin/django-admin.py", line 8, in ? management.execute_from_command_line() File "/usr/lib/python2.4/site-packages/django/core/management.py", line 1254, in execute

Re: Best way to construct an email - attach a html file and send

2006-08-09 Thread a
thanks guys..!!! Kenneth Gonsalves wrote: > On 09-Aug-06, at 3:34 PM, a wrote: > > > What is the best way to construct an email in python and also attach a > > html file > > covered in the docs - see sending email: > > http://www.djangoproject.com/documentation/em

Re: db already exists can i use the CRUD admin interface

2006-08-09 Thread a
) File "/usr/lib/python2.4/site-packages/django/db/backends/postgresql_psycopg2/introspection.py", line 35, in get_relations relations[int(row[0][1:-1]) - 1] = (int(row[1][1:-1]) - 1, row[2]) TypeError: int() argument must be a string or a number thanks Kenneth Gonsalves wrote: > On 0

flash messages

2006-08-09 Thread a
how do we display flash messages in django The todo "Todo object" was deleted successfully. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@go

admin interface

2006-08-09 Thread a
i like the admin interface and want to modify it for my needs, do you have pointers on how to go about it thanks a lot --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

memcached equivalent in python

2006-08-11 Thread a
is there a memcached equivalent in python thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe

Re: memcached equivalent in python

2006-08-11 Thread a
dont know perl... Jeremy Dunck wrote: > What do you consider equivalent? > > > On 8/11/06, a <[EMAIL PROTECTED]> wrote: > > > > is there a memcached equivalent in python > > > > thanks > > --~--~-~--~~~---~--

rewriting urls

2006-08-12 Thread a
http://localhost/todo i want to rewrite this automatically as http://localhost/todo/ is there a easy way to do this thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

suggestions for rss reader

2006-08-13 Thread a
keep a list of read and unread items hi guys i m building an rss reader and i want you suggestions for datastructure for keeping read and unread list for each use i m assuming it will be very sparse thanks --~--~-~--~~~---~--~~ You received this message because

what features do you like to see in a rss reader

2006-08-13 Thread a
dear django users i m developing a feedreader/web desktop using django i m looking for feature suggesstions thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

javascript options

2006-08-14 Thread a
guys i m trying to figure out which javascript toolkit to use i m now trying to figure out which to use between The major contenders are: Dojo Mochikit and prototype [rails fame] i would love to find out which is very pythonic and clean if you can also tell about your experience of using one of

subdomains in django

2006-08-14 Thread a
can you point out how to do this in django and in python thanks a bunch --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegro

Re: subdomains in django

2006-08-15 Thread a
thanks ian how to do in lighttpd? thanks a lot Ian Holsman wrote: > I'm not sure what you are asking. > > what do you want django to do with the subdomain? > if it is a different site, you can do this via virtual hosts in apache. > if you bob.example.com to be 'bobs'

Re: javascript options

2006-08-15 Thread a
thanks this is amazing help Steven Armstrong wrote: > > > > guys i m trying to figure out which javascript toolkit to use > > > > i m now trying to figure out which to use between > > The major contenders are: > > Dojo > > + lot's of features > + great for writing widgets > - documentation sucks >

question about huge websites

2006-08-15 Thread a
ine is a pain. What kind of low-level socket and threading code is necessary for a db intensive site such as reddit. How do we use it from django? does anyone have experience using it please reply... --~--~-~--~~~---~--~~ You received this message because you

getting and storing favicon.ico as an image

2006-08-15 Thread a
/favicon.ico i want to get the favicon.ico from the URL when a blog is added to the aggregator and then display the image, this is the usage scenario Please let me know how to do this in python i m willing to use os.spawnv() and call convert if need be thanks a lot

search in django

2006-08-15 Thread a
how is searching implemented in the admin interface inorder to use searching should we use pylucene thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: search in django

2006-08-15 Thread a
wat are the addons needed for postgresql thanks a lot [EMAIL PROTECTED] wrote: > Data in the database is searched by LIKE (or ILIKE) SQL command which > is wrapped in Django ORM. If you need fulltext search engine you can > use MySQL which has such feature (you need to user raw S

favicon.ico displaying in page

2006-08-17 Thread a
and some others http://cache.valleywag.com/assets/www.valleywag.com/img/favicon.ico"/> is there an easy way to handle this, if anyone has done this, pls share thanks a lot as i m doing an aggregator, i need to display these icons next to the content so i was asking if some1 has experien

comet usage

2006-08-17 Thread a
Hi guys i was wondering if someone has successfuly used server push for apps such as meebo etc using django if so can you share some guidelines on using them I have a continuously running python webserver and a website, if there is a new mail or message, how do i ping and let the website or the

Re: question about huge websites

2006-08-17 Thread a
I would imagine that they aren't just using a database. most of the "low level socket stuff" I've seen is about setting timeouts and doing Async IO. thanks ian you are a gem, can you explain this further... Ian Holsman wrote: > On 16/08/2006, at 7:39 AM, a wrote: > >

Re: search in django

2006-08-18 Thread a
u guys rock!!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED]

import opml file

2006-08-24 Thread a
hi guys how do i import opml file in django using syndication i m tryin to build an rss reader thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djang

Re: import opml file

2006-08-24 Thread a
thanks a lot man Ian Holsman wrote: > you might want to check out FeedJack http://www.feedjack.org/ > it's done a lot of stuff in that area. > > regards > Ian > > On 24/08/2006, at 5:42 PM, a wrote: > > > > > hi guys how do i import opml file in django &

Re: import opml file

2006-08-26 Thread a
feedjack is a lot of stuff, it exports opml but it doesnt import opml any ideas for importing opml > > you might want to check out FeedJack http://www.feedjack.org/ > > it's done a lot of stuff in that area. > > > > regards > > Ian > > > > On 24/0

inverted index for python

2006-08-26 Thread a
i was looking for the inverted index module cici-mills and chris had presented at pycon 1996 digicool or a similar inverted index for python http://www.digicool.com/releases/unsupported/InvertedIndex/ if you can share it it ll be great --~--~-~--~~~---~--~~ You

Re: import opml file

2006-09-09 Thread a
thanks Jon Atkinson wrote: > I've found that using XMLObject > (http://www.freenet.org.nz/python/xmlobject/) is a simple way to get > the feed information from an OPML feed, then you can read the feed > however you like (e.g. with Feedparser (www.feedparser.org)). > Something

stripping html of tags

2006-09-12 Thread a
hi guys i want to display a snippet of data from a html source, and i want to strip it of html because an unclose tag will make the rest of the page look like that please help me out thanks --~--~-~--~~~---~--~~ You received this message because you are

Re: stripping html of tags

2006-09-12 Thread a
url a gem wat about unclosed tags such a href="google.com because i need a slice of data... Guillermo Fernandez Castellanos wrote: > Cheers, > > > i want to display a snippet of data from a html source, and i want to > > strip it of html because an unclose tag will ma

prespawn lighttpd

2006-09-12 Thread a
prespawn lighttpd, any ideas on how to do this or specify in config thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To

Re: stripping html of tags

2006-09-12 Thread a
http://youtube.com/profile?us leaves these behind do you know to fix these Guillermo Fernandez Castellanos wrote: > Cheers, > > > i want to display a snippet of data from a html source, and i want to > > strip it of html because an unclose tag will make the rest of the page &

Re: stripping html of tags

2006-09-12 Thread a
because i have to display about 10 elements and each can be over 1 or 2pages long but i m going to display only 200 characters from each and if i strip the whole thing it becomes a huge time lag for generating the page.. SmileyChris wrote: > Why don't you strip before y

Re: stripping html of tags

2006-09-14 Thread a
i dont understand patches i ll appreciate if you can send me the html file thanks SmileyChris wrote: > How about slicing to 1000 (or however much you want to be safe that > you'll get 200 of non-tags), then strip, then slice down to 200. > > For a slightly different approach t

i18n support?

2005-08-05 Thread A
How can I have a Django site in multiple languages? A.

Re: i18n support?

2005-08-05 Thread A
Never mind. Sorry, for some reason the search turn nothing for i18n. I saw the thread about this. A.

Permission

2005-08-05 Thread A
Hi, I am exploring Django for the first time, and I like what I see. Great work. Looking at the security model, it is a RBAC ( Rol Based Access Control ). I have already a CBAC ( Context Base Access Control ) for a web application in another framework and I would like to know how hard will be

Re: Permission

2005-08-05 Thread A
Just "change" Group for Role and you have a basic RBAC: Users from group A has the permissions assigned to that group. I will look into the code in the following days and see if I can have some fun ;-) Thanks for the reply. A.

Django, request.user is anonymous user in subsequent requests.

2011-03-21 Thread A
I am trying to use couchdb as the backend for my application. The database instance is exposed via a webservice which has authentication methods. I am using in memory cache and in memory sessions as we do not have a relational database. For authenticating against couch, I have written custom

RE: Template not showing my post details

2019-05-29 Thread a
Hi, I can help you. Let me know about your project. Sent from Mail for Windows 10 From: cixtus anyanwu Sent: Wednesday, May 29, 2019 5:41 PM To: Django users Subject: Re: Template not showing my post details Yeah i have some contents on the models in the databse On Wednesday, May 29, 2019 at 10

Conectarme a un AS/400 desde Django

2021-01-27 Thread EDWARD A. LUGO A.
Buenos días, soy nuevo en Django y no he podido conectarme a un archivo que tengo dentro de un AS/400. La Librería se llama: RORIVENTAA y el archivo se llama: IVARET por favor si me pueden dar una mano, muchas gracias de antemano. -- You received this message because you are subscribed to

Re: Conectarme a un AS/400 desde Django

2021-01-28 Thread EDWARD A. LUGO A.
; has no attribute 'BOOLEAN'* y no me deja conectarme con los archivos dentro del AS/400 Por favor me puedes corregir donde estoy cometiendo el error? Muchas gracias por tu tiempo. El mié, 27 de ene. de 2021 a la(s) 13:25, Miguel Ángel Cumpa Ascuña ( miguel.cumpa.asc...@gmail.com) escribi

Re: Accessing Sessions in Custom Tags

2008-10-21 Thread Eugene A.
Thanks for post, I searched this solve too long. But: I added in settings.py TEMPLATE_CONTEXT_PROCESSORS = (         'django.core.context_processors.request', ) and it doesn't work, raises 'Failed lookup for key [request] in u"[{'sess': 'hello', 'mods': [, ]}]"' So 'request' field isn't in cont

Re: Newbie Help with Models and Views

2008-12-22 Thread Mike A
Paul, Thanks for the help. I switched to the get method, and the data prints correctly now. Thanks! -Mike On Dec 22, 5:44 pm, "Wayper, Paul" wrote: > > .filter returns a list of the items that match the query.  So > > you're trying to stringify a list.  That'

Re: FileSystemStorage content vs PIL Image - **Initial solution**

2009-01-05 Thread A Melé
Donn, take a look at django-thumbs source code, it integrates PIL and SotrageBackend: http://code.google.com/p/django-thumbs/source/browse/trunk/thumbs.py I hope the code helps you. Regards, Antonio Melé http://django.es/blog/ On 5 ene, 13:30, Donn wrote: > On Monday, 05 January 2009 14

Upcoming on-line Spanish translation sprint: Friday, Jan. 9, 2009

2009-01-07 Thread A Melé
>From Friday, Jan. 9 to Sunday, Jan. 11, 2009 the Spanish Django community is going to hold an on-line translation sprint. The main purpose of this sprint is to translate the most important parts of the Django documentation into Spanish. After that the Spanish documentation will be available in th

Many to One Relationship

2008-08-27 Thread Daniel A.
Hi! I'm a switcher from Rails and I'm learning Django. I'm stuck with something I thing should be easy but for some reason I can't find the error. I'm trying to define a model to manage shifts for volunteers. I have three diferent models, Shifts, Users and Swaps. A Us

Re: Many to One Relationship

2008-08-27 Thread Daniel A.
_name value for > those ForeignKeys.  Take a look at the documentation for related_name > here:http://www.djangoproject.com/documentation/model-api/#many-to-one-rel... > > class Swaps(models.Model): >         origin_shift = models.ForeignKey(Shifts, > related_name=

Generate admin files. Views and Templates with Django?

2008-08-28 Thread Daniel A.
I'm a Rails switcher to Django. In Rails there's an option to generate all the scaffold files, ie, there's a command line script that creates all the files in the project folder of the admin interface. I want to know if there's something simila

Re: Blueprint css versus YUI grids versus ?

2009-01-17 Thread a b
can you please explain what are the differences between YUI and Blueprint? There is also http://960.gs/ Thanks On Sat, Jan 17, 2009 at 11:32 PM, Chris Amico wrote: > > I found Blueprint pretty easy to grasp. I'm not a designer, but it's > worked beautifully for me, at lea

Re: Multiple images in form

2009-01-22 Thread A Melé
DragonSlayre, django-thumbs fields act exactly the same way as any ImageField (the inherit from ImageFIeld), so they can be blank and null. That shouldn't be a problem. Regards, Antonio Melé http://django.es/blog/ On 20 ene, 19:21, DragonSlayre wrote: > Yeah, I had to add a related

Re: ImageField, width_field, height_field not working

2009-02-03 Thread A Melé
nick wrote: > > So the next thing is to narrow down which commit. You know a good commit > > and you know a bad one. Now pick something halfway in between and try > > that. Continue with binary searching. It won't take many repetitions to > > get to the precise commit.

Caching db connections

2009-02-23 Thread A B
I need to use a db backend (Sybase) which is not supported by Django. I don't need to use the Django ORM but would like Django to maintain a pool of open db connections so that I don't have to make a new connection every time I need to run a query (similar functionality offered by Apac

Support for HTML arrays in Django forms

2009-02-24 Thread A B
Is there any way to create a form that expects an array using the name="field[]" HTML construct. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Adding new attributes to objects in a query_set in custom Manager

2009-03-03 Thread A Melé
I tried to add a custom attribute to the objects in the query_set of a custom Manager before returning the query_set but it seems not to work: class SongManager(models.Manager): def expire(self): from boto.s3.connection import S3Connection c = S3Connection() for song

Re: Sending a list of items by email

2009-03-03 Thread A Melé
Alfonso, If you ar using text e-mail you can just use: ', '.join(order_list) or '\n'.join(order_list) Another way, is using a string (nice for sending HTML e-mails): order_list = CustomerBasket.objects.all() customer = UserProfile.objects.get(user=user).customer bo

override render_to_response

2009-03-16 Thread a b
Hi, I'm building a one page app with no page refresh. All the content is loaded as JSON dynamically and the UI is built using javascript. I'm using external django apps and I need them to send back the context dict as JSON instead of rendering the html template. Is it possible t

Django as a Template Engine?

2009-03-24 Thread Dave A
Hi, I'm new to Django -- I'm evaluating open source frameworks in an attempt to port an existing application to a non-proprietary platform. I like Django, but am not sure about how to approach an application templating function from the current system... In short, each registered u

Doctests for custom template tags

2009-07-17 Thread A Khodyrev
Hello I'm writing a library of helper classes/functions to ease creation of custom template tags. So a natural doctest (or an example in the documentation) goes like this: define a compiler function and Node class with my helpers, register them with a tag library, define a bunch of tem

Re: Doctests for custom template tags

2009-07-18 Thread A Khodyrev
In case someone with the same question finds this. I've subclassed Template to accept a list of template.Libraries: from django.template import Template, TemplateEncodingError, StringOrigin, Lexer, Parser from django.utils.encoding import smart_unicode class TestableTemplate(Template):

Accent-insensitive queryset filter

2009-08-19 Thread A Melé
Is there any way to perform an accent insensitive match when you are filtering a queryset? I'm looking for something like iexact (http:// docs.djangoproject.com/en/dev/ref/models/querysets/#iexact) but accent- insensitive. Is there any simple way to do it? Than

Re: Accent-insensitive queryset filter

2009-08-20 Thread A Melé
PostgreSQL. It seems that it is accent-sensitive by default. On 20 ago, 03:57, Karen Tracey wrote: > On Wed, Aug 19, 2009 at 6:47 PM, A Melé wrote: > > > Is there any way to perform an accent insensitive match when you are > > filtering a queryset? I'm looking for some

Re: Image Location

2009-09-05 Thread A. Rossi
I am suffering a similar problem, but I think the problem is that my URLConf is improperly configured to display the images. Could somebody direct me to the proper documentation for displaying static images with the dev server? On Aug 23, 9:18 am, "J. Cliff Dyer" wrote: > On Sun,

Re: has_add_permission() isn't working properly

2009-05-17 Thread Sergio A.
the issue seems not to be totally solved by the patch. If I have two classes A and B class A has a field being a foreign key to a B class field in the admin, when I add an A element, I see the '+' button on the foreign key field to B even though I do not have the rights to create a

Re: has_add_permission() isn't working properly

2009-05-17 Thread Sergio A.
t 5:34 PM, Sergio A. > > wrote: > > >> the issue seems not to be totally solved by the patch. > > >> If I have two classes A and B > >> class A has a field being a foreign key to a B class field > >> in the admin, when I add an A element, I see the &#

select template for adminform based on type of user

2009-05-28 Thread Sergio A.
Dear all, Is it possible to select the template to be applied to an admin form based on the logged user? In particular, I've two cases: - if super user, a certain template should be used - if not a super user, but the owner of the data, then another template should be used - if not a super

Re: select template for adminform based on type of user

2009-06-02 Thread Sergio A.
any hint on this issue? Thanks, Sergio On May 29, 12:51 am, "Sergio A." wrote: > Dear all, > > Is it possible to select the template to be applied to an admin form > based on the logged user? > In particular, I've two cases: > > - if super user, a certain

in admin interface - how to edit/show data based on ownership/not ownership

2009-06-11 Thread Sergio A.
means that I should be able to compare logged user to the data owner and then select a proper template (to change/present) data. Any example on how to do this in the admin module? Thanks, Sergio --~--~-~--~~~---~--~~ You received this message because you are subscrib

Re: in admin interface - how to edit/show data based on ownership/not ownership

2009-06-14 Thread Sergio A.
I need to identify where to overwrite the template selection, and in that place, if I can get current user. I have not found a proper solution yet. Sergio On Jun 11, 10:32 pm, phoebebright wrote: > This post might help > -http://groups.google.com/group/django-users/browse_thread/threa

Re: in admin interface - how to edit/show data based on ownership/not ownership

2009-06-14 Thread Sergio A.
I found where to work on. The render_change_form function in the options.py file where the render_change_form is invoked. All the information seem to be available in that context. Sergio On Jun 14, 2:42 pm, "Sergio A." wrote: > I need to identify where to overwrite the template s

ImageField anti-duplication

2009-09-12 Thread A. Rossi
I have an application where users can upload images, then the image is renamed to a SHA256 hash of the file's contents. Here is the relevant snippet of the model class ImagePost(Post): def imgurl(self, filename): import hashlib, os.path extension = os.path.splitext(fil

Re: ImageField anti-duplication

2009-09-12 Thread A. Rossi
I had not considered writing a custom Storage class. I may try that if there are no other alternatives. Any other ideas/solutions? On Sep 12, 5:31 am, vinilios wrote: > Have you read this ? > > http://docs.djangoproject.com/en/dev/howto/custom-file-storage/ > > haven't

Re: ImageField anti-duplication

2009-09-20 Thread A. Rossi
Yup, that did it! Thanks for pointing that out! That article was hard to find in the documentation. On Sep 12, 7:58 pm, "A. Rossi" wrote: > I had not considered writing a custom Storage class. I may try that if > there are no other alternatives. > > Any other ideas/solut

Re: Is it possible to use custom template tag inside another tag?

2009-10-05 Thread Andrius A
Thanks for advice! On Oct 4, 2009 9:23 PM, "AmanKow" wrote: > custom tag is a function - cant you just assing its return in view > into variable and send this... The usual way to go about this would be to modify your tag to take an optional "as var_name". When the ta

Connection limit exceeded for non-superusers

2009-10-09 Thread A Melé
I am using Django with PostgreSQL and everything was ok but in the last weeks I get this error sometimes when loading my sites. I didn't make any changes to the database configuration so I don't know why it doesn't work sometimes. Anybody knows how to solve this? Is Django keeping db connections o

Re: Connection limit exceeded for non-superusers

2009-10-09 Thread A Melé
transaction | f | 2009-09-30 15:00:01.85973-05 | 2009-09-30 15:00:54.566471-05 | 2009-09-30 15:00:01.858281-05 | | -1 and 93 more rows! On 9 oct, 12:27, A Melé wrote: > I am using Django with PostgreSQL and everything was ok but in the > last weeks I get this

Re: Connection limit exceeded for non-superusers

2009-10-11 Thread A Melé
Looking at the postgresql log I can see it's probably the connection hasn't been closed: LOG: unexpected EOF on client connection Any ideas on this? Thank you. On 9 oct, 12:34, A Melé wrote: > I get this when I run the query: SELECT * FROM pg_stat_activity > >  datid |

how to get back to a view requiring login

2009-10-11 Thread Sergio A.
I've three views each with different URL. They are visible to logged in users. If a non-logged user tries to access a URL requiring login, I'm able to redirect it to the login page. What I'm missing is how to go back to the initial page, once the user log in the system.

in modeladmin - show a field to edit only if superuser

2009-10-13 Thread Sergio A.
I'd like to show for editing the 'owner' field only to superuser; I'm using django 1.0: class ProductAdmin(admin.ModelAdmin): form = ProductForm fieldsets = [ ('Product Identification', {'fields': ['owner', 'code', ...), ('Product Description', {'fields': ['...]

Re: Url params with space

2009-10-23 Thread Andrius A
Hi Sumanth, Yes we do. Use urlib.unquote_plus() Regards, Andrius On 23 Oct 2009 17:14, "Sumanth" wrote: Hi All, I have url as show below http://localhost:8000/view/1/1/?scenario=Base,%20Credit now when I do a request.REQUEST['scenario'] I see a value of '

Maximum AutoField Value

2009-10-31 Thread A. Rossi
What is the maximal value for an AutoField? When that value is reached, does it "wrap" around to 0, or does something else occur? Is it database-backend dependent? I can't find it in the documentation, nor on this mailing list. Thank you. --~--~-~--~~~---~--~~ You

Help with Formset (I think it is formset I need)

2010-06-20 Thread Bryan A
Hello: I am trying to create a form with a check box list for Tags associated with an Appointment. Form: Please list tags for this Appoingmen _ Work _ School _ Other I need to design this so users can add additional

Model inheritance

2010-01-12 Thread a b
Hi, I have three models: Product SimpleProduct that extends Product GroupProduct that extends Product and have ManyToMany relation with SimpleProduct The reason to use the base Product model is so I can use paging. Is it possible to make a query that gives a list of GroupProducts and

  1   2   3   4   5   >