The solution three is also a really nice feature Tom, but it’s a different 
think, IMO. The update() is a QuerySet method and it does not call the save() 
method or trigger any of the signals. This is very important, specially for 
third party packages support. The django-model-utils for example…

... from model_utils.fields import MonitorField class Invoice(model.Model): ... 
paid_at = MonitorField(monitor='paid') def pay(self): 
self.update_fields(paid=True)  
[]’s
Paulo Poiati  
blog.paulopoiati.com

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/f5acf03d-7a90-4e34-9cae-80411abba580%40Paulos-iMac.local.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to