Ticket #10329: get_FOO_display-link.diff

File get_FOO_display-link.diff, 1.5 KB (added by Tim Graham, 16 years ago)

linking get_FOO_display, plus a stray colon deleted

  • docs/ref/models/fields.txt

     
    136136
    137137For each model field that has :attr:`~Field.choices` set, Django will add a
    138138method to retrieve the human-readable name for the field's current value. See
    139 :meth:`~django.db.models.Model.get_FOO_display` in the database API
    140 documentation.
     139:meth:`~django.db.models.Model.get_FOO_display`.
    141140
    142141Finally, note that choices can be any iterable object -- not necessarily a list
    143142or tuple. This lets you construct choices dynamically. But if you find yourself
     
    724723
    725724The admin represents this as an ``<input type="text">`` (a single-line input).
    726725
    727 Like all ::class:`CharField` subclasses, :class:`URLField` takes the optional
     726Like all :class:`CharField` subclasses, :class:`URLField` takes the optional
    728727:attr:`~CharField.max_length`argument. If you don't specify
    729728:attr:`~CharField.max_length`, a default of 200 is used.
    730729
  • docs/ref/models/instances.txt

     
    369369get_FOO_display()
    370370-----------------
    371371
     372.. method:: Model.get_FOO_display()
     373
    372374For every field that has ``choices`` set, the object will have a
    373375``get_FOO_display()`` method, where ``FOO`` is the name of the field. This
    374376method returns the "human-readable" value of the field. For example, in the
Back to Top