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 4 of 7

0.9

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

* Added ``.only()`` and ``.defer()`` support.
* Added support for Django 1.8 complex expressions in ``.annotate()`` / ``.aggregate()``.
* Fix Django 1.9 handling of custom URLs.
The new change-URL redirect overlapped any custom URLs defined in the child admin.
* Fix Django 1.9 support in the admin.
* Fix setting an extra custom manager without overriding the ``_default_manager``.
* Fix missing ``history_view()`` redirection to the child admin, which is important for django-reversion_ support.
See the documentation for hints for :ref:`django-reversion-compare support <django-reversion-compare-support>`.

0.8.1

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

* Fixed support for reverse relations for ``relname___field`` when the field starts with an ``_`` character.
Otherwise, the query will be interpreted as subclass lookup (``ClassName___field``).

0.8

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

* Added Django 1.9 compatibility.
* Renamed ``polymorphic.manager`` => ``polymorphic.managers`` for consistentcy.
* **BACKWARDS INCOMPATIBILITY:** The import paths have changed to support Django 1.9.
Instead of ``from polymorphic import X``,
you'll have to import from the proper package. For example:

.. code-block:: python

from polymorphic.models import PolymorphicModel
from polymorphic.managers import PolymorphicManager, PolymorphicQuerySet
from polymorphic.showfields import ShowFieldContent, ShowFieldType, ShowFieldTypeAndContent

* **BACKWARDS INCOMPATIBILITY:** Removed ``__version__.py`` in favor of a standard ``__version__`` in ``polymorphic/__init__.py``.
* **BACKWARDS INCOMPATIBILITY:** Removed automatic proxying of method calls to the queryset class.
Use the standard Django methods instead:

.. code-block:: python

In model code:
objects = PolymorphicQuerySet.as_manager()

For manager code:
MyCustomManager = PolymorphicManager.from_queryset(MyCustomQuerySet)

0.7.2

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

* Added ``queryset.as_manager()`` support for Django 1.7/1.8
* Optimize model access for non-dumpdata usage; avoid ``__getattribute__()`` call each time to access the manager.
* Fixed 500 error when using invalid PK's in the admin URL, return 404 instead.
* Fixed possible issues when using an custom ``AdminSite`` class for the parent object.
* Fixed Pickle exception when polymorphic model is cached.

0.7.1

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

* Fixed Django 1.8 support for related field widgets.

0.7

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

* Added Django 1.8 support
* Added support for custom primary key defined using ``mybase_ptr = models.OneToOneField(BaseClass, parent_link=True, related_name="...")``.
* Fixed Python 3 issue in the admin
* Fixed ``_default_manager`` to be consistent with Django, it's now assigned directly instead of using ``add_to_class()``
* Fixed 500 error for admin URLs without a '/', e.g. ``admin/app/parentmodel/id``.
* Fixed preserved filter for Django admin in delete views
* Removed test noise for diamond inheritance problem (which Django 1.7 detects)

Page 4 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.