On Oct 25, 4:28 pm, Russell Keith-Magee <russ...@keith-magee.com>
wrote:
> On Sun, Oct 24, 2010 at 3:42 PM, Andrew Godwin <and...@aeracode.org> wrote:
> >  On 23/10/10 12:54, George Sakkis wrote:
>
> >> This has been (rightly) marked as DDN, so I'm wondering if there are
> >> any thoughts on it to move it forward, one way or another. Original
> >> thread at
> >>http://groups.google.com/group/django-developers/browse_frm/thread/3b....
>
> >> George
>
> > My personal opinion on this is that we shouldn't put this into pre_save -
> > I'd rather not have us doing a query before we get that far (and I've seen
> > quite a few things that do some validation in pre_save, so cancellation
> > happens reasonably often).
>
> > I'm also not particularly fond of adding yet another signal - we risk making
> > it a mess of connection points, and signal calls, even if empty, do have
> > overhead.
>
> > My preferred solution is either to not ship this, or replace it with a
> > decorator which does this for you (so you can wrap your pre_save listener
> > function in the decorator, which does the existence query for you, and which
> > also passes this information back up to the model instance so we don't end
> > up doing three queries). That way, people who want this can have it, we
> > don't have a useless extra query in nearly any scenario, and we don't change
> > current behaviour.
>
> For the record, I concur with Andrew's reasoning.

Fair enough; unless someone objects in the next few days, I'll close
it as wontfix.

George

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to