diff options
| author | Julien Phalip <jphalip@gmail.com> | 2011-10-26 12:19:18 +0000 |
|---|---|---|
| committer | Julien Phalip <jphalip@gmail.com> | 2011-10-26 12:19:18 +0000 |
| commit | 9796f69533320171bf22d769d6e4ab3f5a45aac1 (patch) | |
| tree | da65072a8743d2e0f069b0c047201b0d31b463ed /docs/ref | |
| parent | a05c70fae133d2ece1bcf1ce6f152a6a70ab8cf2 (diff) | |
Fixed #16257 -- Added new `ModelAdmin.get_list_display_links()` method to allow for the dynamic display of links on the admin changelist. Thanks to graveyboat for the suggestion and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17037 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/contrib/admin/index.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index 1e283151b0..2590243144 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -1044,6 +1044,16 @@ templates used by the :class:`ModelAdmin` views: displayed on the changelist view as described above in the :attr:`ModelAdmin.list_display` section. +.. method:: ModelAdmin.get_list_display_links(self, request, list_display) + + .. versionadded:: 1.4 + + The ``get_list_display_links`` method is given the ``HttpRequest`` and + the ``list`` or ``tuple`` returned by :meth:`ModelAdmin.get_list_display`. + It is expected to return a ``list`` or ``tuple`` of field names on the + changelist that will be linked to the change view, as described in the + :attr:`ModelAdmin.list_display_links` section. + .. method:: ModelAdmin.get_urls(self) The ``get_urls`` method on a ``ModelAdmin`` returns the URLs to be used for |
