mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-03-17 04:10:24 +00:00
Django model mixins and utilities.
When calling `select_related()` with an empty list of arguments [1], Django will
try to prefetch some data by doing some first level joints with the related
classes.
This can lead to obvious negative performance impact, but this also breaks some
workarounds for having inheritance for foreign keys [2], as those solutions rely
on lazy evaluation of the related object.
[1]:
|
||
|---|---|---|
| .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`_ 2.1+ and 3.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/
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