Hi,

On Saturday 16 November 2013 21:02:00 Anssi Kääriäinen wrote:
> Any feedback for pre/post_update idea?
> 
As Loic said, the signals sound like they can be useful in a variety of 
situations. A couple of notes, though:

> pre_update listeners get a queryset that isn't executed.

The "query" part, only, I assume; then they should also somehow get the 
intended update parameters. Perhaps the actual keyword arguments to update().

> Accessing that queryset might be costly

Accessing objects from that queryset may be a footgun -- if they somehow stay 
in memory after the update is executed, they will become stale. There should 
be stern warnings about this in the documentation, or even -- and this is just 
thinking outloud, I haven't considered all the evil effects -- holding weakrefs 
to all these objects and using the new model reload mechanism to refresh them 
after the update.

Shai.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/201311201717.11988.shai%40platonix.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to