Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.6.x] Fixed #14006 -- Documented that Field's 'description' attribu…

…te is interpolated with field.__dict__

Thanks abeld for the suggestion.

Backport of 2d96e66 from master.
  • Loading branch information...
commit a22b2aea192e8722aa3004c9e50e728438a453cd 1 parent a9dd622
@timgraham timgraham authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 docs/howto/custom-model-fields.txt
View
7 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
--------------
Please sign in to comment.
Something went wrong with that request. Please try again.