From a276bdebb2e8ef4619d0cb9a02b0b9f4f73ee998 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Tue, 31 Jul 2012 16:20:41 -0400 Subject: [PATCH] [1.4.X] Fixed #16168 - Added note regarding type requirements when overridng ModelForm fields. Thanks Pieter Swinkels for the patch. Backport of ebbc414d17 from master --- docs/topics/forms/modelforms.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt index d2aa8863fc..f49c9ba6df 100644 --- a/docs/topics/forms/modelforms.txt +++ b/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 ` for more information on fields and their arguments.