Changes between Version 1 and Version 2 of Ticket #22571, comment 6


Ignore:
Timestamp:
Dec 31, 2014, 11:06:22 PM (10 years ago)
Author:
Bibhas C Debnath

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22571, comment 6

    v1 v2  
    2525
    2626And the [https://github.com/django/django/blob/master/django/db/models/fields/__init__.py#L1378 code] also shows that the value with always set to `timezone.now()` if `auto_now_add` is set, even if you provide a value when creating it.
     27
     28Maybe we could update the doc to clarify what happens -
     29
     30> Note that the current date is always used; it’s not just a default value that you can override. So even if you set a value to this field when creating the object, it will be ignored. If you want to be able to modify this field, set `default=timezone.now` instead of this `auto_now_add=True`.
Back to Top