Fixed #15990 - Simplified a sentence regarding form validation for ModelForms; thanks jblaine for the suggestion.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16329 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
070151293d
commit
fc508fd5d2
|
@ -195,14 +195,11 @@ we'll discuss in a moment.)::
|
||||||
The ``is_valid()`` method and ``errors``
|
The ``is_valid()`` method and ``errors``
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
|
||||||
.. versionchanged:: 1.2
|
|
||||||
|
|
||||||
The first time you call ``is_valid()`` or access the ``errors`` attribute of a
|
The first time you call ``is_valid()`` or access the ``errors`` attribute of a
|
||||||
``ModelForm`` has always triggered form validation, but as of Django 1.2, it
|
``ModelForm`` triggers form validation as well as :ref:`model validation
|
||||||
will also trigger :ref:`model validation <validating-objects>`. This has the
|
<validating-objects>`. This has the side-effect of cleaning the model you pass
|
||||||
side-effect of cleaning the model you pass to the ``ModelForm`` constructor.
|
to the ``ModelForm`` constructor. For instance, calling ``is_valid()`` on your
|
||||||
For instance, calling ``is_valid()`` on your form will convert any date fields
|
form will convert any date fields on your model to actual date objects.
|
||||||
on your model to actual date objects.
|
|
||||||
|
|
||||||
|
|
||||||
The ``save()`` method
|
The ``save()`` method
|
||||||
|
|
Loading…
Reference in New Issue