Support updating many fields on CounterField.
Review Request #5279 — Created Jan. 20, 2014 and submitted
This adds two new class methods for
decrement_many. These can be used for incrementing or decrementing many
fields at once on an instance of a model.
It also makes two changes to saving field values.
An initializer can now return
None, meaning that
the field and save the object. That's intended for when an initializer
will be handling setting the field itself, perhaps through
When saving the field,
ensuring we only save those affected fields and don't unintentionally
save other aspects of the model.
Tested along with a change on Review Board that makes extensive use
of these functions.