From ddd77d5fd348a09b13d0d3201074317f96e33dce Mon Sep 17 00:00:00 2001 From: zhuanyenan <280145668@qq.com> Date: Sun, 18 Sep 2016 01:16:41 +0800 Subject: [PATCH] [1.10.x] Corrected docs for return type of Field.formfield(). Backport of 17677d510f65012531a5af57fd056fb15cfe1067 from master --- 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 4b962f30c0..8fe1d90dea 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -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.