summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Sokół <kobbuz@gmail.com>2014-02-22 15:18:51 +0100
committerBaptiste Mispelon <bmispelon@gmail.com>2014-02-22 18:11:43 +0100
commit09b725f51bbfa0f01b27ee2d718889926d409519 (patch)
tree15cc1b264cc006b4e789a66b8d808e6c2950d4be
parent98f13762d7e18c0ba12044eed56e9198ca056c66 (diff)
Fixed #21902 -- Documented search order for list_display.
-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 e44ecc8e55..b44d9d6f13 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -699,6 +699,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