Re: Model validation incompatibility with existing Django idioms

2010-01-09 Thread Tai Lee
On Jan 9, 12:36 am, Honza Král wrote: > On Fri, Jan 8, 2010 at 11:59 AM, koenb wrote: > > > On 8 jan, 10:03, James Bennett wrote: > > >> Suppose I have a ModelForm and call save(commit=False) to get the > >> instance so I can do some more work on it. I'm basically saying to > >> Django "I don't

Re: Model validation incompatibility with existing Django idioms

2010-01-09 Thread Ben Phillips
-Original Message- From: Ivan Sagalaev Date: Sun, 10 Jan 2010 03:25:29 To: Subject: Re: Model validation incompatibility with existing Django idioms Joseph Kocherhans wrote: > # Run validation that was missed by the form. > p.validate_fields(fields=['user', 'pr

Re: Model validation incompatibility with existing Django idioms

2010-01-09 Thread Joseph Kocherhans
On Sat, Jan 9, 2010 at 6:25 PM, Ivan Sagalaev wrote: > Joseph Kocherhans wrote: >> >>            # Run validation that was missed by the form. >>            p.validate_fields(fields=['user', 'primary_contact']) >>            p.validate_unique(fields=['user', 'primary_contact']) >>            p.val

Re: Model validation incompatibility with existing Django idioms

2010-01-09 Thread Ivan Sagalaev
Joseph Kocherhans wrote: # Run validation that was missed by the form. p.validate_fields(fields=['user', 'primary_contact']) p.validate_unique(fields=['user', 'primary_contact']) p.validate() Can this be shortcut to p.full_validate(fields=['u

Re: Ticket resolved but not marked as such

2010-01-09 Thread aditya
Got it. Thanks. On Jan 9, 1:32 pm, Karen Tracey wrote: > On Sat, Jan 9, 2010 at 2:24 PM, aditya wrote: > > From what I can see, the following ticket: > > >http://code.djangoproject.com/ticket/4092 > > > is addressing the same issue as this ticket: > > >http://code.djangoproject.com/ticket/10969

Re: Model validation incompatibility with existing Django idioms

2010-01-09 Thread Joseph Kocherhans
On Wed, Jan 6, 2010 at 12:49 PM, Simon Willison wrote: > A couple of related tickets filed today about model validation: > > http://code.djangoproject.com/ticket/12513 > http://code.djangoproject.com/ticket/12521 > > The first one describes the issue best - the new model validation code > breaks t

Re: Model validation incompatibility with existing Django idioms

2010-01-09 Thread Tobias McNulty
On Sat, Jan 9, 2010 at 7:46 AM, Ivan Sagalaev wrote: > I too would opt for an implementation that makes model validation optional, >> i.e., a call that developers must explicitly make, if they choose, before >> saving a model. >> > > I'm +1 on some way of validating a form without *fully* validati

Logging format decision

2010-01-09 Thread Ivan Sagalaev
Hello everyone! There was a discussion here some time ago about logging in Django that led to the ticket 12012 [1] where Simon has done most (all?) of the implementation. There is still a disagreement on the format of the configuration dict for it. Simon has implemented it from my ad-hoc pro

Re: Model validation incompatibility with existing Django idioms

2010-01-09 Thread Ivan Sagalaev
Tobias McNulty wrote: I don't see why model validation should be bound up with forms at all. I'm not the one who designed it, so it's just me view. I think this is just useful: if you have a code validating, say, a CharField at the model level why not reuse it at the form level? What's impo

Re: Ticket resolved but not marked as such

2010-01-09 Thread Karen Tracey
On Sat, Jan 9, 2010 at 2:24 PM, aditya wrote: > From what I can see, the following ticket: > > http://code.djangoproject.com/ticket/4092 > > is addressing the same issue as this ticket: > > http://code.djangoproject.com/ticket/10969 > > > Ticket #10969 is closed, but ticket #4092 is still marked

Ticket resolved but not marked as such

2010-01-09 Thread aditya
>From what I can see, the following ticket: http://code.djangoproject.com/ticket/4092 is addressing the same issue as this ticket: http://code.djangoproject.com/ticket/10969 Ticket #10969 is closed, but ticket #4092 is still marked as "new". Can we close #4092? Aditya -- You received this me

Re: possible bug in model validation layer

2010-01-09 Thread Karen Tracey
On Sat, Jan 9, 2010 at 8:52 AM, Waldemar Kornewald wrote: > Hi, > the model validation layer checks for uniqueness of the primary_key > (in base.py: _perform_unique_checks()). But what if the pk value is > None (indicating for an AutoField that it should get an id from the > DB)? > > Currently, it

possible bug in model validation layer

2010-01-09 Thread Waldemar Kornewald
Hi, the model validation layer checks for uniqueness of the primary_key (in base.py: _perform_unique_checks()). But what if the pk value is None (indicating for an AutoField that it should get an id from the DB)? Currently, it still issues a DB query testing if there's an entity with a pk of None/

Re: Model validation incompatibility with existing Django idioms

2010-01-09 Thread Ivan Sagalaev
Tobias McNulty wrote: I regret and apologize that I'm arriving to this thread rather late. To support the tradition, I'm apoligizing for this too :-). Though it's funny how everyone thinks they're "late" on a couple-of-days-old thread :-). Anyway... I too would opt for an implementation tha

Re: Porting Django to Python 3

2010-01-09 Thread Jesus Mager
Hi all! I'm CS student at the National Autonomous University of Mexico, and I'm very interested to porting Django to Python 3 too. I hope the efforts porting Django will be public on a svn branch, so I can also collaborate. And of course, if a core developer can guide us, it will be much better.

Re: Call for comment: #5390 Many To Many signals

2010-01-09 Thread Russell Keith-Magee
On Sat, Jan 9, 2010 at 3:10 PM, Xia Kai(夏恺) wrote: > Hi, > > First thing first, I shall explain why this have something to do with admin. > > Django's admin save m2m relationship in ModelAdmin's change_view method. > After some tracing, you would find that the m2m relationship is saved using > Mod