From 17677d510f65012531a5af57fd056fb15cfe1067 Mon Sep 17 00:00:00 2001 From: zhuanyenan <280145668@qq.com> Date: Sun, 18 Sep 2016 01:16:41 +0800 Subject: [PATCH] Corrected docs for return type of Field.formfield(). --- docs/ref/models/fields.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 873310b194..df96fbf827 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -1897,9 +1897,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.