django-model-utils/model_utils
Daniel Andrlik 25743141bc Ensure TimeStampedModel modified equals created on initial creation. (#319)
*  Ensure TimeStampedModel modified equals created on initial creation.

Add logic to AutoLastModifiedField which checks to see if the associated created field of the correct cField class type is also present. If the instance has not yet been saved (missing a pk), then set the value to modified to be equal to created.

Fixes #247

📚 Update changes and authors list related to changes.

* 🚑 Set TimeStampedModel modified to be equal to created during first save.

If instance does not yet have a pk, before defaulting the last modified to the current time, iterate over the the fields of the model, and instead use whatever value is found in the first occurance of the AutoCreatedField.

Fixes #247

* Move changelog up to unreleased section.
2018-12-08 12:23:04 +06:00
..
locale/de/LC_MESSAGES Add script and makefile tasks for making and compiling messages; un-gitignore .mo files. 2015-07-20 10:20:11 -06:00
__init__.py update tag 2018-11-03 11:12:50 +06:00
choices.py Add support for reverse iteration of Choices (#314) 2018-12-08 11:47:54 +06:00
fields.py Ensure TimeStampedModel modified equals created on initial creation. (#319) 2018-12-08 12:23:04 +06:00
managers.py Fix missing subclasses and annotated in cloned InheritanceQueryset (#335) 2018-12-08 11:26:36 +06:00
models.py Add default manager as all_objects for SoftDeletableModel (#326) 2018-12-08 11:50:10 +06:00
tracker.py fix #330 patch MyModel.save instead of MyModel().save 2018-11-20 18:32:09 +03:00