Ticket #14006: 14006.diff

File 14006.diff, 790 bytes (added by Tim Graham, 11 years ago)
  • docs/howto/custom-model-fields.txt

    diff --git a/docs/howto/custom-model-fields.txt b/docs/howto/custom-model-fields.txt
    index 5a5bef9..af652de 100644
    a b descriptive text in a ``description`` class attribute of your custom field. In  
    314314the above example, the description displayed by the ``admindocs``
    315315application for a ``HandField`` will be 'A hand of cards (bridge style)'.
    316316
     317In the :mod:`django.contrib.admindocs` display, the field description is
     318interpolated with ``field.__dict__`` which allows the description to
     319incorporate arguments of the field. For example, the description for
     320:class:`~django.db.models.CharField` is::
     321
     322    description = _("String (up to %(max_length)s)")
     323
    317324Useful methods
    318325--------------
    319326
Back to Top