1
0
mirror of https://github.com/django/django.git synced 2025-08-23 18:29:12 +00:00

[2.0.x] Removed incorrect reference to ModelChoiceField in Field.choices docs.

Backport of 3ffbd54566f51e4ac3d90fc6be8b3ab56fc89b75 from master
This commit is contained in:
LeeHanYeong 2017-10-11 20:37:31 +09:00 committed by Tim Graham
parent 5d3f2aa3f1
commit edd3601be6

View File

@ -170,10 +170,11 @@ ones:
) )
The first element in each tuple is the value that will be stored in the The first element in each tuple is the value that will be stored in the
database. The second element will be displayed by the default form widget database. The second element is displayed by the field's form widget.
or in a :class:`~django.forms.ModelChoiceField`. Given a model instance,
the display value for a choices field can be accessed using the Given a model instance, the display value for a field with ``choices`` can
``get_FOO_display()`` method. For example:: be accessed using the :meth:`~django.db.models.Model.get_FOO_display`
method. For example::
from django.db import models from django.db import models