Re: "unique_together" only validated in modelform.is_valid() if ALL of the referenced fields (Ticket #13091)

2011-04-23 Thread Florian Apolloner
On Apr 23, 7:12 pm, Florian Apolloner wrote: > > In any case, if we have this, I could see switching the admin to use it, > > and perhaps adding an overridable method that's called from within the > > context manager, to allow you to complete/tweak the model instance > >

Re: "unique_together" only validated in modelform.is_valid() if ALL of the referenced fields (Ticket #13091)

2011-04-23 Thread Florian Apolloner
Hey Carl, On Apr 23, 5:55 pm, Carl Meyer wrote: > http://groups.google.com/group/django-developers/msg/3014f29c5125653ais > where it was briefly mentioned by Lukasz, I haven't seen any discussion > since. Thx > In any case, if we have this, I could see switching the admin to

Re: #14891, a.k.a. "related managers don't work how we claim they do"

2011-04-23 Thread Carl Meyer
On 04/19/2011 01:47 AM, Ivan Sagalaev wrote: > OK, may be not reverse OneToOne… What I mean is that although it seems > natural to treat all relations equally they are actually used for > different use cases where different defaults make sense. For example: > > - Reverse many-to-one

Re: #14891, a.k.a. "related managers don't work how we claim they do"

2011-04-23 Thread Carl Meyer
On 04/19/2011 04:58 AM, Johannes Dollinger wrote: >> Do you have real-world use-cases in mind that require per-relation >> manager configuration? I can't think of any uses I've run across >> that weren't workable with a single default manager used by all >> relations. > > The only time I used a

Re: "unique_together" only validated in modelform.is_valid() if ALL of the referenced fields (Ticket #13091)

2011-04-23 Thread Carl Meyer
Hi Florian, On 04/23/2011 08:18 AM, Florian Apolloner wrote: > Nice, something like that would be great. One of my bigger problems > regarding modelforms lately was that I wanted something like: "If you > don't fill out the user it's set to the current user", in the admin, > with as little

Re: "unique_together" only validated in modelform.is_valid() if ALL of the referenced fields (Ticket #13091)

2011-04-23 Thread Florian Apolloner
On Apr 23, 7:23 am, Carl Meyer wrote: > This is really giving me the itch to build a new context-manager-based > idiom for ModelForm validation in 1.4 that would allow modification of > the to-be-saved object within the context manager and always perform > full validation of the