Small cleanup of docs/model-api.txt change from [4625]

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4626 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2007-02-26 21:52:22 +00:00
parent 96604fdf8f
commit b21fd1e451
1 changed files with 3 additions and 4 deletions

View File

@ -498,10 +498,9 @@ or outside your model class altogether::
class Foo(models.Model): class Foo(models.Model):
gender = models.CharField(maxlength=1, choices=GENDER_CHOICES) gender = models.CharField(maxlength=1, choices=GENDER_CHOICES)
For each field on your model which has ``choices`` set, Django will For each model field that has ``choices`` set, Django will add a method to
add a method to retrieve the human-readable name for the field's retrieve the human-readable name for the field's current value. See
current value; see `get_FOO_display`_ in the database API `get_FOO_display`_ in the database API documentation.
documentation.
.. _get_FOO_display: ../db_api/#get-foo-display .. _get_FOO_display: ../db_api/#get-foo-display