Re: Proposal: update_fields shortcut

2014-03-05 Thread Paulo Poiati
Thanks for your feedback Russel. I understand and agree with your points, every solution has a drawback. I just think that the Zen of Python “There should be one-- and preferably only one --obvious way to do it.” shouldn’t be taken so seriously. What I mean is, isn’t QuerySet#get just a shor

Re: Proposal: update_fields shortcut

2014-03-05 Thread Russell Keith-Magee
On Wed, Mar 5, 2014 at 10:05 PM, Paulo Poiati wrote: > Hello everyone, > > While developing standard web applications one thing I frequently do is > updating just one field of a model instance and save it after that. The > best way to do that today (if you want to avoid the update in all the > fie

Re: Proposal: update_fields shortcut

2014-03-05 Thread Paulo Poiati
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…

Re: Proposal: update_fields shortcut

2014-03-05 Thread Tom Evans
On Wed, Mar 5, 2014 at 2:05 PM, Paulo Poiati wrote: > Hello everyone, > > While developing standard web applications one thing I frequently do is > updating just one field of a model instance and save it after that. The best > way to do that today (if you want to avoid the update in all the fields