mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-03-16 20:00:23 +00:00
Django model mixins and utilities.
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. |
||
|---|---|---|
| .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.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