Code

Ticket #18173: ticket18173-patch.diff

File ticket18173-patch.diff, 1.3 KB (added by vanessagomes, 22 months ago)

Description of get_changelist was moved to the methods section.

Line 
1diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
2index 7aca098..ad4f6ba 100644
3--- a/docs/ref/contrib/admin/index.txt
4+++ b/docs/ref/contrib/admin/index.txt
5@@ -371,12 +371,6 @@ subclass::
6         because ``raw_id_fields`` and ``radio_fields`` imply custom widgets of
7         their own.
8 
9-.. attribute:: ModelAdmin.get_changelist
10-
11-    Returns the Changelist class to be used for listing. By default,
12-    ``django.contrib.admin.views.main.ChangeList`` is used. By inheriting this
13-    class you can change the behavior of the listing.
14-
15 .. attribute:: ModelAdmin.inlines
16 
17     See :class:`InlineModelAdmin` objects below.
18@@ -1168,6 +1162,12 @@ templates used by the :class:`ModelAdmin` views:
19                         kwargs['choices'] += (('ready', 'Ready for deployment'),)
20                 return super(MyModelAdmin, self).formfield_for_choice_field(db_field, request, **kwargs)
21 
22+.. method:: ModelAdmin.get_changelist(self, request, **kwargs)
23+
24+    Returns the Changelist class to be used for listing. By default,
25+    ``django.contrib.admin.views.main.ChangeList`` is used. By inheriting this
26+    class you can change the behavior of the listing.
27+
28 .. method:: ModelAdmin.has_add_permission(self, request)
29 
30     Should return ``True`` if adding an object is permitted, ``False``