Ticket #15746: patch_for_list_filter_docs.txt

File patch_for_list_filter_docs.txt, 1.0 KB (added by jammon, 13 years ago)

Patch for documentation

Line 
1diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
2index c28dc8b..25abb96 100644
3--- a/docs/ref/contrib/admin/index.txt
4+++ b/docs/ref/contrib/admin/index.txt
5@@ -531,17 +531,19 @@ subclass::
6 list_display = ('username', 'email', 'first_name', 'last_name', 'is_staff')
7 list_filter = ('is_staff', 'is_superuser')
8
9- Fields in ``list_filter`` can also span relations using the ``__`` lookup::
10-
11- class UserAdminWithLookup(UserAdmin):
12- list_filter = ('groups__name')
13-
14 The above code results in an admin change list page that looks like this:
15
16 .. image:: _images/users_changelist.png
17
18 (This example also has ``search_fields`` defined. See below.)
19
20+ Fields in ``list_filter`` can also span relations using the ``__`` lookup::
21+
22+ class UserAdminWithLookup(UserAdmin):
23+ list_filter = ('groups__name')
24+
25+ .. versionadded:: 1.3
26+
27 .. attribute:: ModelAdmin.list_per_page
28
29 Set ``list_per_page`` to control how many items appear on each paginated
Back to Top