Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.4.X] Fixed #16168 - Added note regarding type requirements when ov…

…erridng ModelForm fields.

Thanks Pieter Swinkels for the patch.

Backport of ebbc414 from master
  • Loading branch information...
commit a276bdebb2e8ef4619d0cb9a02b0b9f4f73ee998 1 parent 751a34e
@timgraham timgraham authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 docs/topics/forms/modelforms.txt
View
4 docs/topics/forms/modelforms.txt
@@ -443,6 +443,10 @@ parameter when declaring the form field::
class Meta:
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
on fields and their arguments.
Please sign in to comment.
Something went wrong with that request. Please try again.