mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #14206 - dynamic list_display support in admin
Thanks to gabejackson for the suggestion, and to cyrus for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16340 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
45e55b9143
commit
207e3ed9d5
3 changed files with 96 additions and 24 deletions
|
@ -967,6 +967,15 @@ templates used by the :class:`ModelAdmin` views:
|
|||
a ``dictionary``, as described above in the :attr:`ModelAdmin.prepopulated_fields`
|
||||
section.
|
||||
|
||||
.. method:: ModelAdmin.get_list_display(self, request)
|
||||
|
||||
.. versionadded:: 1.4
|
||||
|
||||
The ``get_list_display`` method is given the ``HttpRequest`` and is
|
||||
expected to return a ``list`` or ``tuple`` of field names that will be
|
||||
displayed on the changelist view as described above in the
|
||||
:attr:`ModelAdmin.list_display` section.
|
||||
|
||||
.. method:: ModelAdmin.get_urls(self)
|
||||
|
||||
The ``get_urls`` method on a ``ModelAdmin`` returns the URLs to be used for
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue