mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
[1.6.x] Fixed #21902 -- Documented search order for list_display.
Backport of 09b725f51bbfa0f01b27ee2d718889926d409519 from master.
This commit is contained in:
parent
882f2a5b81
commit
98070b94a9
@ -617,6 +617,17 @@ subclass::
|
|||||||
the HTML output, in the form of ``column-<field_name>`` on each ``<th>``
|
the HTML output, in the form of ``column-<field_name>`` on each ``<th>``
|
||||||
element. This can be used to set column widths in a CSS file for example.
|
element. This can be used to set column widths in a CSS file for example.
|
||||||
|
|
||||||
|
* Django will try to interpret every element of ``list_display`` in this
|
||||||
|
order:
|
||||||
|
|
||||||
|
* A field of the model.
|
||||||
|
* A callable.
|
||||||
|
* A string representing a ``ModelAdmin`` attribute.
|
||||||
|
* A string representing a model attribute.
|
||||||
|
|
||||||
|
For example if you have ``first_name`` as a model field and
|
||||||
|
as a ``ModelAdmin`` attribute, the model field will be used.
|
||||||
|
|
||||||
|
|
||||||
.. attribute:: ModelAdmin.list_display_links
|
.. attribute:: ModelAdmin.list_display_links
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user