Author: adrian
Date: 2007-07-13 16:20:07 -0500 (Fri, 13 Jul 2007)
New Revision: 5691

Modified:
   django/trunk/docs/newforms.txt
Log:
Documented the 'commit' argument to save() methods on forms created via 
form_for_model() or form_for_instance()

Modified: django/trunk/docs/newforms.txt
===================================================================
--- django/trunk/docs/newforms.txt      2007-07-13 20:36:01 UTC (rev 5690)
+++ django/trunk/docs/newforms.txt      2007-07-13 21:20:07 UTC (rev 5691)
@@ -1495,6 +1495,13 @@
 Note that ``save()`` will raise a ``ValueError`` if the data in the form
 doesn't validate -- i.e., ``if form.errors``.
 
+This ``save()`` method accepts an optional ``commit`` keyword argument, which
+accepts either ``True`` or ``False``. If you call ``save()`` with
+``commit=False``, then it will return an object that hasn't yet been saved to
+the database. In this case, it's up to you to call ``save()`` on the resulting
+model instance. This is useful if you want to do custom processing on the
+object before saving it. ``commit`` is ``True`` by default.
+
 Using an alternate base class
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to