Kaydet (Commit) ebbc414d authored tarafından Tim Graham's avatar Tim Graham

Fixed #16168 - Added note regarding type requirements when overridng ModelForm fields.

Thanks Pieter Swinkels for the patch.
üst 964979e8
...@@ -437,6 +437,10 @@ parameter when declaring the form field:: ...@@ -437,6 +437,10 @@ parameter when declaring the form field::
class Meta: class Meta:
model = Article model = Article
You must ensure that the type of the form field can be used to set the
contents of the corresponding model field. When they are not compatible,
you will get a ``ValueError`` as no implicit conversion takes place.
See the :doc:`form field documentation </ref/forms/fields>` for more information See the :doc:`form field documentation </ref/forms/fields>` for more information
on fields and their arguments. on fields and their arguments.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment