mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
[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
This commit is contained in:
parent
751a34e4b3
commit
a276bdebb2
1 changed files with 4 additions and 0 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue