Django-model-utils

Latest version: v5.0.0

Safety actively analyzes 710445 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 7

2.1.1

------------------

- ASCII-fold all non-ASCII characters in changelog; again. Argh. Apologies to
those whose names are mangled by this change. It seems that distutils makes
it impossible to handle non-ASCII content reliably under Python 3 in a
setup.py long_description, when the system encoding may be ASCII. Thanks
Brian May for the report. Fixes GH-141.

2.1.0

------------------

- Add support for Django's built-in migrations to ``MonitorField`` and
``StatusField``.

- ``PassThroughManager`` now has support for seeing exposed methods via
``dir``, allowing `IPython`_ tab completion to be useful. Merge of GH-104,
fixes GH-55.

- Add pickle support for models using ``FieldTracker``. Thanks Ondrej Slintak
for the report. Thanks Matthew Schinckel for the fix. Merge of GH-130,
fixes GH-83.

.. _IPython: https://ipython.org/

2.0.3

-------------------

- Fix ``get_query_set`` vs ``get_queryset`` in ``PassThroughManager`` for
Django <1.6. Fixes issues with related managers not filtering by relation
properly. Thanks whop, Bojan Mihelac, Daniel Shapiro, and Matthew Schinckel
for the report; Matthew for the fix. Merge of GH-121.

- Fix ``FieldTracker`` with deferred model attributes. Thanks Michael van
Tellingen. Merge of GH-115.

- Fix ``InheritanceManager`` with self-referential FK; avoid infinite
recursion. Thanks rsenkbeil. Merge of GH-114.

2.0.2

-------------------

- ASCII-fold all non-ASCII characters in changelog. Apologies to those whose
names are mangled by this change. It seems that distutils makes it impossible
to handle non-ASCII content reliably under Python 3 in a setup.py
long_description, when the system encoding may be ASCII. Thanks Simone Dalla
for the report. Fixes GH-113.

2.0.1

-------------------

- Fix dependency to be on "Django" rather than "django", which plays better
with static PyPI mirrors. Thanks Travis Swicegood.

- Fix issue with attempt to access ``__slots__`` when copying
``PassThroughManager``. Thanks Patryk Zawadzki. Merge of GH-105.

- Improve ``InheritanceManager`` so any attributes added by using extra(select)
will be propagated onto children. Thanks Curtis Maloney. Merge of GH-101,
fixes GH-34.

- Added ``InheritanceManagerMixin``, ``InheritanceQuerySetMixin``,
``PassThroughManagerMixin``, and ``QueryManagerMixin`` to allow composing
their functionality with other custom manager/queryset subclasses (e.g. those
in GeoDjango). Thanks Douglas Meehan!

2.0

----------------

- BACKWARDS-INCOMPATIBLE: Indexing into a ``Choices`` instance now translates
database representations to human-readable choice names, rather than simply
indexing into an array of choice tuples. (Indexing into ``Choices`` was
previously not documented.) If you have code that is relying on indexing or
slicing ``Choices``, the simplest workaround is to change e.g. ``STATUS[1:]``
to ``list(STATUS)[1:]``.

- Fixed bug with checking for field name conflicts for added query managers on
`StatusModel`.

- Can pass `choices_name` to `StatusField` to use a different name for
choices class attribute. ``STATUS`` is used by default.

- Can pass model subclasses, rather than strings, into
`select_subclasses()`. Thanks Keryn Knight. Merge of GH-79.

- Deepcopying a `Choices` instance no longer fails with infinite recursion in
`getattr`. Thanks Leden. Merge of GH-75.

- `get_subclass()` method is now available on both managers and
querysets. Thanks Travis Swicegood. Merge of GH-82.

- Fix bug in `InheritanceManager` with grandchild classes on Django 1.6+;
`select_subclasses('child', 'child__grandchild')` would only ever get to the
child class. Thanks Keryn Knight for report and proposed fix.

- MonitorField now accepts a 'when' parameter. It will update only when the field
changes to one of the values specified.

Page 5 of 7

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.