Validation discrepancies between admin and newforms

2007-01-31 Thread Kilian CAVALOTTI
Hi all, I just noticed that fields validation occurs at several places, in a incoherent fashion: in the admin application, and in newforms/fields.py. For instance, a PhoneNumberField has to be XXX-XXX- in the admin, while it is handled as an IntegerField in newforms (thus validation fails on

Re: INSTALLED_APPS partially shown in admin with mod_python

2006-07-27 Thread Kilian CAVALOTTI
#x27;) True After that, I'm truly lost, and I get no idea of what could be wrong. Did anyone has any idea why the hasattr function could return different values according to the server used? -- Kilian CAVALOTTI Administ

INSTALLED_APPS partially shown in admin with mod_python

2006-07-26 Thread Kilian CAVALOTTI
s), but it's not shown on the main admin page. Any idea why? Regards, -- Kilian CAVALOTTI Administrateur réseaux et systèmes UPMC / CNRS - LIP6 (C870) 8, rue du Capitaine Scott Tel. : 01 44 27 88 54 75015 Paris - France Fax.

Re: list_display: How to change the label for each field

2006-07-24 Thread Kilian CAVALOTTI
verbose_name= "Foo Object" verbose_name_plural = "Foo Objects" See <http://www.djangoproject.com/documentation/model_api/#meta-options> Regards, -- Kilian CAVALOTTI Administrateur réseaux et systèmes UPMC / CNRS - LIP6 (C870)

Re: Custom SQL in Q objects

2006-07-13 Thread Kilian CAVALOTTI
On Thursday 13 July 2006 01:33, Russell Keith-Magee wrote: > On 7/12/06, Kilian CAVALOTTI <[EMAIL PROTECTED]> wrote: > No. Q objects do not support custom SQL - they are just wrappers that can > be used to wrap groups of keyword search parameters (e.g., > article__name__conta

Custom SQL in Q objects

2006-07-12 Thread Kilian CAVALOTTI
Hi all, I'd like to know if Q objects support custom SQL queries, as used in extra() function? -- Kilian CAVALOTTI Administrateur réseaux et systèmes UPMC / CNRS - LIP6 (C870) 8, rue du Capitaine Scott Tel. : 01 44 27 88 54 75015 Paris - F

Re: Validations

2006-07-10 Thread Kilian CAVALOTTI
7;size'] == None and all_data['weight'] == None: raise validators.ValidationError("You should provide weight and size values to set checked_logistics.") foo = models.CharField(maxlength = 63, unique = True, validator_list

Fw: unique and blank/null

2006-07-09 Thread Kilian CAVALOTTI
t don't you think it would be useful to give the user a mean of treating all kinds of input fields the same way? Do you realy think that a 'empty_asnull=True' option for CharFields would be useless? Whatever, thanks a lot for taking time answering my questions. Best regards, --

Re: unique and blank/null

2006-07-09 Thread Kilian CAVALOTTI
rth to add an 'empty_asnull' option in the CharField class. What do you think? My 0.02¤. :) -- Kilian CAVALOTTI Administrateur réseaux et systèmes UPMC / CNRS - LIP6 (C870) 8, rue du Capitaine Scott Tel. : 01 44 27 88 54 75015 Paris - Franc

Re: About reverse queries in FK relationships

2006-07-07 Thread Kilian CAVALOTTI
the bogus answer earlier. I am going to try and be > more careful in future. That was just dumb. Don't mind, really. I already sincerely appreciate you took time to look after this. Thanks a lot. Kudos! -- Kilian CAVALOTTI Administrateur réseaux et systèmes UPMC / CN

Re: unique and blank/null

2006-07-07 Thread Kilian CAVALOTTI
d null=False, empty admin fields should indeed be stored as empty strings (or whatever the db field was defined to). And I can't find any example where the (blank=False and null=True) case could be used. Perhaps there are other situations I didn't think of where

unique and blank/null

2006-07-07 Thread Kilian CAVALOTTI
nique. Actually, with SQLite at least, it seems that multiple NULL values are considered non unique. Is there a way to achieve this, other than using a custom validator? TIA, -- Kilian CAVALOTTI Administrateur réseaux et systèmes UPMC / CNRS - LIP6 (C870) 8, rue du Capi

About reverse queries in FK relationships

2006-07-07 Thread Kilian CAVALOTTI
ters in the admin interface (ie. Reporters who still do not have written any article, they lazy guys). TIA, -- Kilian CAVALOTTI Administrateur réseaux et systèmes UPMC / CNRS - LIP6 (C870) 8, rue du Capitaine Scott Tel. : 01 4

dynamic limit_choices_to in admin

2006-07-03 Thread Kilian CAVALOTTI
interface, but before digging into it, I'd like to know if some people have the same requirements, and as it seem to be a quite generic need, if somebody has a solution. If not, has there been some reflexion about that kind of feature? Thanks, -- Kilian CAVALOTTI

Re: Django t-shirts: your ideas wanted!

2006-06-28 Thread Kilian CAVALOTTI
es me laugh... :) +1, 'we indented jazz' is really great. :) To add some to the list: "django: jazz your web" "django: because style matters" "ror is a grunt. jazz is music" (fairplay, what's that? :)) "django plays music of the web" My $0.02

Templates parameters

2006-05-26 Thread Kilian CAVALOTTI
nging (like class attribute), and I currently have to duplicate these redundant blocks. Which seems quite frustrating for a DRY framework. :) Thanks in advance, -- Kilian CAVALOTTI Administrateur réseaux et systèmes UPMC / CNRS - LIP6 (C870) 8, rue du Capitaine Sco

Re: SQLite concurrent access to database

2006-05-22 Thread Kilian CAVALOTTI
to the same > database at the same time. " Indeed. I just wanted to use SQLite to avoid the MySQL installation/setup/upgrade cycle, but if I can't find a way to configure my NFS mounts to allow better locking, I'd switch to MySQL. Thanks a lot, -- Kilian CAVALOTTI

SQLite concurrent access to database

2006-05-21 Thread Kilian CAVALOTTI
mits, or something else, to avoid this? Thanks in advance, -- Kilian CAVALOTTI Administrateur réseaux et systèmes UPMC / CNRS - LIP6 (C870) 8, rue du Capitaine Scott Tel. : 01 44 27 88 54 75015 Paris - France Fax. : 01 44 27

Re: Django server

2006-05-06 Thread Kilian CAVALOTTI
kill the python process corresponding to your previous 'runserver' command. Depending on your OS, you should use ps or the Task Manager to identify the right process. On linux, netstat -anp --tcp | grep 8000 should give you the culprit. HTH, -- Kilian CAVALOTTI A

Re: Field options validation only occur in admin interface?

2006-05-05 Thread Kilian CAVALOTTI
in the framework, since models already have many different types of properties, each with its own kind of limitation. So I would found natural to validate properties values when you do save() rather than only implement them in a specific application. Don't misinterpret me here, it'

Re: Field options validation only occur in admin interface?

2006-05-05 Thread Kilian CAVALOTTI
On Thursday 04 May 2006 18:29, Clint Ecker wrote: > Check these threads out. The short answer is, "it's coming." :) Hey, great to know! Having recently dived into django, I was not aware of these discussions. Thanks for having pointed them out to me. --

Field options validation only occur in admin interface?

2006-05-04 Thread Kilian CAVALOTTI
It's the same with a PositiveInteger(), which allow to save negative values (not from the admin interface, only when manipulating python objects). All this seems to show that fields type and contents validation does not occur at object creation, but only in the admin interface. Is this a wan