summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2012-07-08 18:35:17 -0400
committerTim Graham <timograham@gmail.com>2012-07-08 18:38:52 -0400
commitdcede04715fb4896ae7892c2a63ea534496ee0bf (patch)
treec02dbb74ca0e2259107a12274854097e8bfb6027
parent9a2ca4266ad3a58af7db3ecbf9b99270519bb8f2 (diff)
[1.4.x] Fixed #18173 - Corrected ModelAdmin documentation for get_changelist.
Thanks Keryn Knight for the report and vanessagomes for the pckport of [d44aa98] from master.atch. Backport of [d44aa98] from master.
-rw-r--r--docs/ref/contrib/admin/index.txt14
1 files changed, 6 insertions, 8 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index 1163a5b87e..ba8f1acbd8 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -378,14 +378,6 @@ subclass::
because ``raw_id_fields`` and ``radio_fields`` imply custom widgets of
their own.
-.. attribute:: ModelAdmin.get_changelist
-
- .. versionchanged:: 1.2
-
- Returns the Changelist class to be used for listing. By default,
- ``django.contrib.admin.views.main.ChangeList`` is used. By inheriting this
- class you can change the behavior of the listing.
-
.. attribute:: ModelAdmin.inlines
See :class:`InlineModelAdmin` objects below.
@@ -1185,6 +1177,12 @@ templates used by the :class:`ModelAdmin` views:
kwargs['choices'] += (('ready', 'Ready for deployment'),)
return super(MyModelAdmin, self).formfield_for_choice_field(db_field, request, **kwargs)
+.. method:: ModelAdmin.get_changelist(self, request, **kwargs)
+
+ Returns the Changelist class to be used for listing. By default,
+ ``django.contrib.admin.views.main.ChangeList`` is used. By inheriting this
+ class you can change the behavior of the listing.
+
.. method:: ModelAdmin.has_add_permission(self, request)
Should return ``True`` if adding an object is permitted, ``False``