summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorMarcin Sokół <kobbuz@gmail.com>2014-02-22 15:18:51 +0100
committerBaptiste Mispelon <bmispelon@gmail.com>2014-02-23 13:54:56 +0100
commit98070b94a9bbb8e915e724c4d23933bd3b243b3c (patch)
tree6b6e4af1b7654e76fe34be31850791cfd2688231 /docs/ref
parent882f2a5b811ad6b528556bef0e31a37710baff94 (diff)
[1.6.x] Fixed #21902 -- Documented search order for list_display.
Backport of 09b725f51bbfa0f01b27ee2d718889926d409519 from master.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/admin/index.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index a62e8575b8..33e6c578de 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -617,6 +617,17 @@ subclass::
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.
+ * 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