diff options
| author | Yamila Moreno <yamila.ms@gmail.com> | 2015-06-05 11:34:54 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-06-05 10:04:24 -0400 |
| commit | 7dcfbb2ef38bb806531d6e73dd179d5266f48d7a (patch) | |
| tree | 3b6c6821fbba6ad784838e41ee0db1f0a2ee7f34 /docs | |
| parent | a1d8a205bc6428865eec82c555bdacb68bf04c62 (diff) | |
[1.8.x] Fixed #22571 -- Added clarification about auto_now_add=True
Backport of cbe4efcbc13ad402bf1f1a94b02a8ec93f20327d from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/models/fields.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index ae3d4bb441..5893a57464 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -495,7 +495,11 @@ optional arguments: Automatically set the field to now when the object is first created. Useful for creation of timestamps. Note that the current date is *always* used; - it's not just a default value that you can override. + it's not just a default value that you can override. So even if you + set a value for this field when creating the object, it will be ignored. + If you want to be able to modify this field, set ``default=timezone.now`` + (from :func:`django.utils.timezone.now`) instead of ``auto_now_add=True``. + The default form widget for this field is a :class:`~django.forms.TextInput`. The admin adds a JavaScript calendar, |
