mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-03-17 04:10:24 +00:00
Django model mixins and utilities.
* ✅ 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. |
||
|---|---|---|
| .github | ||
| docs | ||
| model_utils | ||
| tests | ||
| .coveragerc | ||
| .editorconfig | ||
| .gitignore | ||
| .hgignore | ||
| .hgtags | ||
| .travis.yml | ||
| AUTHORS.rst | ||
| CHANGES.rst | ||
| CONTRIBUTING.rst | ||
| LICENSE.txt | ||
| Makefile | ||
| MANIFEST.in | ||
| README.rst | ||
| requirements-test.txt | ||
| requirements.txt | ||
| setup.cfg | ||
| setup.py | ||
| tox.ini | ||
| translations.py | ||
==================
django-model-utils
==================
.. image:: https://jazzband.co/static/img/badge.svg
:target: https://jazzband.co/
:alt: Jazzband
.. image:: https://travis-ci.org/jazzband/django-model-utils.svg?branch=master
:target: https://travis-ci.org/jazzband/django-model-utils
.. image:: https://codecov.io/gh/jazzband/django-model-utils/branch/master/graph/badge.svg
:target: https://codecov.io/gh/jazzband/django-model-utils
.. image:: https://img.shields.io/pypi/v/django-model-utils.svg
:target: https://pypi.python.org/pypi/django-model-utils
Django model mixins and utilities.
``django-model-utils`` supports `Django`_ 1.8 to 2.1.
.. _Django: http://www.djangoproject.com/
This app is available on `PyPI`_.
.. _PyPI: https://pypi.python.org/pypi/django-model-utils/
Getting Help
============
Documentation for django-model-utils is available
https://django-model-utils.readthedocs.io/
Run tests
---------
.. code-block
pip install -e .
py.test
Contributing
============
Please file bugs and send pull requests to the `GitHub repository`_ and `issue
tracker`_. See `CONTRIBUTING.rst`_ for details.
.. _GitHub repository: https://github.com/jazzband/django-model-utils/
.. _issue tracker: https://github.com/jazzband/django-model-utils/issues
.. _CONTRIBUTING.rst: https://github.com/jazzband/django-model-utils/blob/master/CONTRIBUTING.rst