1
0
mirror of https://github.com/django/django.git synced 2025-04-10 08:19:39 +00:00

[1.10.x] Corrected docs for return type of Field.formfield().

Backport of 17677d510f65012531a5af57fd056fb15cfe1067 from master
This commit is contained in:
zhuanyenan 2016-09-18 01:16:41 +08:00 committed by Tim Graham
parent 393b1c6d45
commit ddd77d5fd3

View File

@ -1909,9 +1909,9 @@ Field API reference
:class:`~django.forms.ModelForm`.
By default, if both ``form_class`` and ``choices_form_class`` are
``None``, it uses :class:`~django.forms.CharField`; if
``choices_form_class`` is given, it returns
:class:`~django.forms.TypedChoiceField`.
``None``, it uses :class:`~django.forms.CharField`. If the field has
:attr:`~django.db.models.Field.choices` and ``choices_form_class``
isn't specified, it uses :class:`~django.forms.TypedChoiceField`.
See :ref:`specifying-form-field-for-model-field` for usage.