summaryrefslogtreecommitdiff
path: root/docs/howto
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-07-06 18:31:59 -0400
committerTim Graham <timograham@gmail.com>2013-07-06 18:33:45 -0400
commit2d96e660f9fb5cbc16de74f29d66daee6d8eaa44 (patch)
tree7832e0962b7b615e38c131627dfa194d2e756e50 /docs/howto
parentc94093c5bae0f8d9c29a2eeda2de2ea85a0c3ca6 (diff)
Fixed #14006 -- Documented that Field's 'description' attribute is interpolated with field.__dict__
Thanks abeld for the suggestion.
Diffstat (limited to 'docs/howto')
-rw-r--r--docs/howto/custom-model-fields.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/howto/custom-model-fields.txt b/docs/howto/custom-model-fields.txt
index 5a5bef9141..af652de78c 100644
--- a/docs/howto/custom-model-fields.txt
+++ b/docs/howto/custom-model-fields.txt
@@ -314,6 +314,13 @@ descriptive text in a ``description`` class attribute of your custom field. In
the above example, the description displayed by the ``admindocs``
application for a ``HandField`` will be 'A hand of cards (bridge style)'.
+In the :mod:`django.contrib.admindocs` display, the field description is
+interpolated with ``field.__dict__`` which allows the description to
+incorporate arguments of the field. For example, the description for
+:class:`~django.db.models.CharField` is::
+
+ description = _("String (up to %(max_length)s)")
+
Useful methods
--------------