Django model mixins and utilities.
Find a file
Lucas Wiman a84c3afddd Fix behavior of .previous() in Django 1.10+.
The complications are that when the attribute is set in Django 1.10,
it no longer counts as a deferred attribute, and it is not retrieved from the database.
Naively updating __set__ to retrieve the value if it is deferred leads to infinite
recursion because accessing the attribute involves loading data from the database
and trying to set the attribute based on that value. This commit introduces
a somewhat hacky flag that records whether we're already trying to set
the attribute further up in the call stack.
2018-06-28 13:15:56 -07:00
.github Pull request and issue template fixes #254 2017-01-17 22:34:04 +00:00
docs Avoid fetching deferred fields in has_changed 2018-02-10 10:53:36 -05:00
model_utils Fix behavior of .previous() in Django 1.10+. 2018-06-28 13:15:56 -07:00
tests Fix test failures from merge. 2018-06-28 11:29:44 -07:00
.coveragerc add codecov to travis 2017-12-11 07:47:48 -06:00
.editorconfig Add EditorConfig file 2013-05-20 22:38:00 -07:00
.gitignore Add script and makefile tasks for making and compiling messages; un-gitignore .mo files. 2015-07-20 10:20:11 -06:00
.hgignore Add runtests.sh script to run tox and generate HTML coverage summary. 2013-01-27 13:35:48 -08:00
.hgtags Added tag 1.1.0 for changeset 92792fb14a51 2012-04-13 17:33:51 -06:00
.travis.yml Add project release info to Travis config. 2018-01-10 10:59:29 +01:00
AUTHORS.rst Merge branch 'defer-has-changed' into django-1.11-compatibility 2018-06-21 12:52:33 -07:00
CHANGES.rst Merge branch 'defer-has-changed' into django-1.11-compatibility 2018-06-21 12:52:33 -07:00
CONTRIBUTING.rst Add jazzband badge/contributing guidelines. 2017-04-15 08:50:55 -07:00
LICENSE.txt Happy New Year! 2015-06-28 19:04:27 -07:00
Makefile Add script and makefile tasks for making and compiling messages; un-gitignore .mo files. 2015-07-20 10:20:11 -06:00
MANIFEST.in Include runtests.py in sdist; bump version to 2.5.2. 2016-08-09 15:06:49 -06:00
README.rst Simplify version mentioning in README, classifiers 2017-12-17 07:38:16 -06:00
requirements-test.txt switch to py.test + pytest-cov 2017-12-11 08:11:55 -06:00
requirements.txt Fixes #231 -- clarify that requirements.txt contains dev dependencies. 2016-08-10 07:07:55 -06:00
setup.cfg switch to py.test + pytest-cov 2017-12-11 08:11:55 -06:00
setup.py Simplify version mentioning in README, classifiers 2017-12-17 07:38:16 -06:00
tox.ini Simplified tox setup with tox-travis. 2018-01-10 10:48:14 +01:00
translations.py Exclude tests from distribution 2017-02-15 23:00:10 +00:00

==================
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.0.

.. _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/

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