summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/admin/index.txt8
-rw-r--r--docs/releases/1.6.txt15
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
~~~~~~~~~~~~~