Browse files

Fixed #16168 - Added note regarding type requirements when overridng …

…ModelForm fields.

Thanks Pieter Swinkels for the patch.
  • Loading branch information...
timgraham committed Jul 31, 2012
1 parent 964979e commit ebbc414d1729f24e395ee050a62276229c59d75d
Showing with 4 additions and 0 deletions.
  1. +4 −0 docs/topics/forms/modelforms.txt
@@ -437,6 +437,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.

0 comments on commit ebbc414

Please sign in to comment.