summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/admin/index.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index 3c05130161..7b473e5d22 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -180,6 +180,11 @@ subclass::
values defined in :attr:`ModelAdmin.readonly_fields` to be displayed as
read-only.
+ The ``fields`` option, unlike :attr:`~ModelAdmin.list_display`, may contain
+ only field names of the model or the form specified by
+ :attr:`~ModelAdmin.form`, not callables. However it *can* contain callables
+ if they are defined in :attr:`~ModelAdmin.readonly_fields`.
+
.. versionadded:: 1.4
To display multiple fields on the same line, wrap those fields in their own
@@ -261,6 +266,10 @@ subclass::
``fields`` can contain values defined in
:attr:`~ModelAdmin.readonly_fields` to be displayed as read-only.
+ If you add a callable name to ``fields``, the same rule applies as
+ with :attr:`~ModelAdmin.fields` option: the callable must be
+ specified in :attr:`~ModelAdmin.readonly_fields`.
+
* ``classes``
A list containing extra CSS classes to apply to the fieldset.