django-model-utils/tests/test_models
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
..
__init__.py Exclude tests from distribution 2017-02-15 23:00:10 +00:00
test_deferred_fields.py Fix F841: local variable is assigned but never used. 2018-07-02 11:50:56 -07:00
test_softdeletable_model.py Exclude tests from distribution 2017-02-15 23:00:10 +00:00
test_status_model.py Fix F841: local variable is assigned but never used. 2018-07-02 11:50:56 -07:00
test_timeframed_model.py Exclude tests from distribution 2017-02-15 23:00:10 +00:00
test_timestamped_model.py Ensure TimeStampedModel modified equals created on initial creation. (#319) 2018-12-08 12:23:04 +06:00