Skip to content

Commit

Permalink
[1.5.x] Fixed #14006 -- Documented that Field's 'description' attribu…
Browse files Browse the repository at this point in the history
…te is interpolated with field.__dict__

Thanks abeld for the suggestion.

Backport of 2d96e66 from master.
  • Loading branch information
timgraham committed Jul 6, 2013
1 parent 6c98458 commit 80673e2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/howto/custom-model-fields.txt
Expand Up @@ -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`` the above example, the description displayed by the ``admindocs``
application for a ``HandField`` will be 'A hand of cards (bridge style)'. 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 Useful methods
-------------- --------------


Expand Down

0 comments on commit 80673e2

Please sign in to comment.