summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Meers <simon@simonmeers.com>2011-04-03 23:09:39 +0000
committerSimon Meers <simon@simonmeers.com>2011-04-03 23:09:39 +0000
commit05054aba7684c8d5b2bbe4ea0e2aee24ae7deba2 (patch)
tree2f6ef4d7ba1aeba446f45c9f5462fe1b2e2d429b
parente5aa2bdcecf52b99ddbaa82ae98d557721d8ae61 (diff)
[1.3.X] Fixed #15746. Clarified updated list_filter documentation.
Backport of r16010 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.3.X@16011 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--docs/ref/contrib/admin/index.txt12
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index c28dc8b7b3..cd6ff31cfc 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -531,17 +531,19 @@ subclass::
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
(This example also has ``search_fields`` defined. See below.)
+ .. versionadded:: 1.3
+
+ Fields in ``list_filter`` can also span relations using the ``__`` lookup::
+
+ class UserAdminWithLookup(UserAdmin):
+ list_filter = ('groups__name')
+
.. attribute:: ModelAdmin.list_per_page
Set ``list_per_page`` to control how many items appear on each paginated