summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDuane Hilton <duane9@gmail.com>2016-03-12 09:15:57 -0700
committerTim Graham <timograham@gmail.com>2016-03-12 12:42:22 -0500
commit421ad283d3a0c9814e6cf5b87b393dce09f59474 (patch)
tree4effa3712fd535b145ab29cc220f795f66aa2bcd /docs
parent16691ed24cce00ac0b90b4ecfcaa31a071727725 (diff)
[1.9.x] Fixed #26239 -- Added a note about how auto_now works with QuerySet.update().
Backport of ca5c05ddbe91f4aae38c4543240dbda5f1fb1db2 from master
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/fields.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index 20c50a0b12..9de9206bc8 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -490,6 +490,12 @@ optional arguments:
for "last-modified" timestamps. Note that the current date is *always*
used; it's not just a default value that you can override.
+ The field is only automatically updated when calling :meth:`Model.save()
+ <django.db.models.Model.save>`. The field isn't updated when making updates
+ to other fields in other ways such as :meth:`QuerySet.update()
+ <django.db.models.query.QuerySet.update>`, though you can specify a custom
+ value for the field in an update like that.
+
.. attribute:: DateField.auto_now_add
Automatically set the field to now when the object is first created. Useful