Fixed #22571 -- Added clarification about auto_now_add=True
This commit is contained in:
parent
c91bc68e9a
commit
cbe4efcbc1
|
@ -490,7 +490,11 @@ optional arguments:
|
||||||
|
|
||||||
Automatically set the field to now when the object is first created. Useful
|
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;
|
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
|
The default form widget for this field is a
|
||||||
:class:`~django.forms.TextInput`. The admin adds a JavaScript calendar,
|
:class:`~django.forms.TextInput`. The admin adds a JavaScript calendar,
|
||||||
|
|
Loading…
Reference in New Issue