Django-polymorphic

Latest version: v3.1.0

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

Scan your dependencies

Page 2 of 7

2.0.2

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

* Fixed manager inheritance behavior for Django 1.11, by automatically enabling ``Meta.manager_inheritance_from_future`` if it's not defined.
This restores the manager inheritance behavior that *django-polymorphic 1.3* provided for Django 1.x projects.
* Fixed internal ``base_objects`` usage.

2.0.1

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

* Fixed manager inheritance detection for Django 1.11.

It's recommended to use ``Meta.manager_inheritance_from_future`` so Django 1.x code also inherit
the ``PolymorphicManager`` in all subclasses. Django 2.0 already does this by default.

* Deprecated the ``base_objects`` manager. Use ``objects.non_polymorphic()`` instead.
* Optimized detection for dumpdata behavior, avoiding the performance hit of ``__getattribute__()``.
* Fixed test management commands

2.0

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

* **BACKWARDS INCOMPATIBILITY:** Dropped Django 1.8 and 1.10 support.
* **BACKWARDS INCOMPATIBILITY:** Removed old deprecated code from 1.0, thus:

* Import managers from ``polymorphic.managers`` (plural), not ``polymorphic.manager``.
* Register child models to the admin as well using ``admin.register()`` or ``admin.site.register()``,
as this is no longer done automatically.

* Added Django 2.0 support.

1.3.1

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

Backported various fixes from 2.x to support older Django versions:

* Added ``PolymorphicTypeUndefined`` exception for incomplete imported models.
When a data migration or import creates an polymorphic model,
the ``polymorphic_ctype_id`` field should be filled in manually too.
The ``polymorphic.utils.reset_polymorphic_ctype`` function can be used for that.
* Added ``PolymorphicTypeInvalid`` exception when database was incorrectly imported.
* Added ``polymorphic.utils.get_base_polymorphic_model()`` to find the base model for types.
* Using ``base_model`` on the polymorphic admins is no longer required, as this can be autodetected.
* Fixed manager errors for swappable models.
* Fixed ``deleteText`` of ``|as_script_options`` template filter.
* Fixed ``.filter(applabel__ModelName___field=...)`` lookups.
* Fixed proxy model support in formsets.
* Fixed error with .defer and child models that use the same parent.
* Fixed error message when ``polymorphic_ctype_id`` is null.
* Fixed fieldsets recursion in the admin.
* Improved ``polymorphic.utils.reset_polymorphic_ctype()`` to accept models in random ordering.
* Fix fieldsets handling in the admin (``declared_fieldsets`` is removed since Django 1.9)

1.3

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

* **BACKWARDS INCOMPATIBILITY:** Dropped Django 1.4, 1.5, 1.6, 1.7, 1.9 and Python 2.6 support.
Only official Django releases (1.8, 1.10, 1.11) are supported now.
* Allow expressions to pass unchanged in ``.order_by()``
* Fixed Django 1.11 accessor checks (to support subclasses of ``ForwardManyToOneDescriptor``, like ``ForwardOneToOneDescriptor``)
* Fixed polib syntax error messages in translations.

1.2

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

* Django 1.11 support.
* Fixed ``PolymorphicInlineModelAdmin`` to explictly exclude ``polymorphic_ctype``.
* Fixed Python 3 TypeError in the admin when preserving the query string.
* Fixed Python 3 issue due to ``force_unicode()`` usage instead of ``force_text()``.
* Fixed ``z-index`` attribute for admin menu appearance.

Page 2 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.