diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-06-18 13:07:28 -0700 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-06-18 13:07:28 -0700 |
| commit | 9da9b3eb0454fa3dea228b16c6e35b01db5eee69 (patch) | |
| tree | f894376d33a3576436bc333a1f07aeb0ae7d9a67 /docs | |
| parent | a01b1ee6881cc4ce6c8bee771bb5b463bc16dd77 (diff) | |
| parent | c86a9b63984f6692d478f6f70e3c78de4ec41814 (diff) | |
Merge pull request #1281 from loic/ticket6903
Fixed #6903 - Preserved admin changelist filters.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/admin/index.txt | 8 | ||||
| -rw-r--r-- | docs/releases/1.6.txt | 15 |
2 files changed, 23 insertions, 0 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index 513499c0c1..90ef68837a 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -870,6 +870,14 @@ subclass:: ``prepopulated_fields`` doesn't accept ``DateTimeField``, ``ForeignKey``, nor ``ManyToManyField`` fields. +.. attribute:: ModelAdmin.preserve_filters + + .. versionadded:: 1.6 + + The admin now preserves filters on the list view after creating, editing + or deleting an object. You can restore the previous behavior of clearing + filters by setting this attribute to ``False``. + .. attribute:: ModelAdmin.radio_fields By default, Django's admin uses a select-box interface (<select>) for diff --git a/docs/releases/1.6.txt b/docs/releases/1.6.txt index 8dea37d2da..bd6255eae6 100644 --- a/docs/releases/1.6.txt +++ b/docs/releases/1.6.txt @@ -325,6 +325,11 @@ Minor features :ref:`see the updated recommendation <raising-validation-error>` for raising a ``ValidationError``. +* :class:`~django.contrib.admin.ModelAdmin` now preserves filters on the list view + after creating, editing or deleting an object. It's possible to restore the previous + behavior of clearing filters by setting the + :attr:`~django.contrib.admin.ModelAdmin.preserve_filters` attribute to ``False``. + Backwards incompatible changes in 1.6 ===================================== @@ -634,6 +639,16 @@ will render something like: If you want to keep the current behavior of rendering ``label_tag`` without the ``label_suffix``, instantiate the form ``label_suffix=''``. +Admin views ``_changelist_filters`` GET parameter +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To achieve preserving and restoring list view filters, admin views now +pass around the `_changelist_filters` GET parameter. It's important that you +account for that change if you have custom admin templates or if your tests +rely on the previous URLs. If you want to revert to the original behavior you +can set the +:attr:`~django.contrib.admin.ModelAdmin.preserve_filters` attribute to ``False``. + Miscellaneous ~~~~~~~~~~~~~ |
