summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorHonza Král <honza.kral@gmail.com>2010-11-21 19:29:15 +0000
committerHonza Král <honza.kral@gmail.com>2010-11-21 19:29:15 +0000
commitdc334a2ba8dbf5134d65c97fea2785c3b2294ef5 (patch)
treeea647738399bee77ef2578231906d95a67fe3c96 /docs
parent274aba3b9b8c48012a2d842790cb3df04dc9ae80 (diff)
Fixed #3400 -- Support for lookup separator with list_filter admin option. Thanks to DrMeers and vitek_pliska for the patch!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14674 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/admin/index.txt5
-rw-r--r--docs/releases/1.3.txt2
2 files changed, 7 insertions, 0 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index cc918be922..89478df65b 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -458,6 +458,11 @@ how both ``list_display`` and ``list_filter`` work::
list_display = ('username', 'email', 'first_name', 'last_name', 'is_staff')
list_filter = ('is_staff', 'is_superuser')
+Fields in ``list_filter`` can also span relations using the ``__`` lookup::
+
+ class UserAdminWithLookup(UserAdmin):
+ list_filter = ('groups__name')
+
The above code results in an admin change list page that looks like this:
.. image:: _images/users_changelist.png
diff --git a/docs/releases/1.3.txt b/docs/releases/1.3.txt
index 24702111a2..fc482b27b4 100644
--- a/docs/releases/1.3.txt
+++ b/docs/releases/1.3.txt
@@ -159,6 +159,8 @@ requests. These include:
<cache_key_prefixing>` and :ref:`transformation
<cache_key_transformation>` has been added to the cache API.
+ * Support for lookups spanning relations in admin's ``list_filter``.
+
.. _backwards-incompatible-changes-1.3:
Backwards-incompatible changes in 1.3