Django-polymorphic

Latest version: v3.1.0

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

Scan your dependencies

Page 3 of 7

1.1

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

* Added class based formset views in ``polymorphic/contrib/extra_views``.
* Added helper function ``polymorphic.utils.reset_polymorphic_ctype()``.
This eases the migration old existing models to polymorphic.
* Fixed Python 2.6 issue.
* Fixed Django 1.6 support.

1.0.2

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

* Added helper function for django-guardian_; add
``GUARDIAN_GET_CONTENT_TYPE = 'polymorphic.contrib.guardian.get_polymorphic_base_content_type'``
to the project settings to let guardian handles inherited models properly.
* Fixed ``polymorphic_modelformset_factory()`` usage.
* Fixed Python 3 bug for inline formsets.
* Fixed CSS for Grappelli, so model choice menu properly overlaps.
* Fixed ``ParentAdminNotRegistered`` exception for models that are registered via a proxy model instead of the real base model.

1.0.1

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

* Fixed compatibility with manager changes in Django 1.10.1

1.0

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

* Added Django 1.10 support.
* Added **admin inline** support for polymorphic models.
* Added **formset** support for polymorphic models.
* Added support for polymorphic queryset limiting effects on *proxy models*.
* Added support for multiple databases with the ``.using()`` method and ``using=..`` keyword argument.
* Fixed modifying passed ``Q()`` objects in place.

.. note::
This version provides a new method for registering the admin models.
While the old method is still supported, we recommend to upgrade your code.
The new registration style improves the compatibility in the Django admin.

* Register each ``PolymorphicChildModelAdmin`` with the admin site too.
* The ``child_models`` attribute of the ``PolymorphicParentModelAdmin`` should be a flat list of all child models.
The ``(model, admin)`` tuple is obsolete.

Also note that proxy models will now limit the queryset too.


Fixed since 1.0b1 (2016-08-10)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Fix formset empty-form display when there are form errors.
* Fix formset empty-form hiding for Grappelli_.
* Fixed packing ``admin/polymorphic/edit_inline/stacked.html`` in the wheel format.

0.9.2

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

* Fix error when using ``date_hierarchy`` field in the admin
* Fixed Django 1.10 warning in admin add-type view.

0.9.1

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

* Fixed support for ``PolymorphicManager.from_queryset()`` for custom query sets.
* Fixed Django 1.7 ``changeform_view()`` redirection to the child admin site.
This fixes custom admin code that uses these views, such as django-reversion_'s ``revision_view()`` / ``recover_view()``.
* Fixed ``.only('pk')`` field support.
* Fixed ``object_history_template`` breadcrumb.
**NOTE:** when using django-reversion_ / django-reversion-compare_, make sure to implement
a ``admin/polymorphic/object_history.html`` template in your project that extends
from ``reversion/object_history.html`` or ``reversion-compare/object_history.html`` respectively.

Page 3 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.