Code

Ticket #14791: clarify_save.diff

File clarify_save.diff, 589 bytes (added by OldTroll, 4 years ago)

Clarify the text about the save() method

Line 
1Index: docs/topics/forms/modelforms.txt
2===================================================================
3--- docs/topics/forms/modelforms.txt    (revision 14721)
4+++ docs/topics/forms/modelforms.txt    (working copy)
5@@ -241,7 +241,7 @@
6     >>> f.save()
7 
8 Note that ``save()`` will raise a ``ValueError`` if the data in the form
9-doesn't validate -- i.e., ``if form.errors``.
10+doesn't validate -- i.e., if form.errors evaluates to True.
11 
12 This ``save()`` method accepts an optional ``commit`` keyword argument, which
13 accepts either ``True`` or ``False``. If you call ``save()`` with