Django-model-utils

Latest version: v4.5.1

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

Scan your dependencies

Page 5 of 7

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.

1.5.0

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

- `Choices` now accepts option-groupings. Fixes GH-14.

- `Choices` can now be added to other `Choices` or to any iterable, and can be
compared for equality with itself. Thanks Tony Aldridge. (Merge of GH-76.)

- `Choices` now `__contains__` its Python identifier values. Thanks Keryn
Knight. (Merge of GH-69).

- Fixed a bug causing ``KeyError`` when saving with the parameter
``update_fields`` in which there are untracked fields. Thanks Mikhail
Silonov. (Merge of GH-70, fixes GH-71).

- Fixed ``FieldTracker`` usage on inherited models. Fixes GH-57.

- Added mutable field support to ``FieldTracker`` (Merge of GH-73, fixes GH-74)

1.4.0

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

- Introduced ``FieldTracker`` as replacement for ``ModelTracker``, which is now
deprecated.

- ``PassThroughManager.for_queryset_class()`` no longer ignores superclass
``get_query_set``. Thanks Andy Freeland.

- Fixed ``InheritanceManager`` bug with grandchildren in Django 1.6. Thanks
CrazyCasta.

- Fixed lack of ``get_FOO_display`` method for ``StatusField``. Fixes GH-41.

1.3.1

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

- Added explicit default to ``BooleanField`` in tests, for Django trunk
compatibility.

- Fixed intermittent ``StatusField`` bug. Fixes GH-29.

- Added Python 3 support.

- Dropped support for Django 1.2 and 1.3. Django 1.4.2+ required.

Page 5 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.