summaryrefslogtreecommitdiff
path: root/docs/ref/models
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-01-08 00:21:45 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-01-08 00:21:45 +0000
commit4bbbf6cc12fded628fc5115523907be691c0d13b (patch)
tree016a7931d0983268f7dad602aa163663ed5a2bf0 /docs/ref/models
parent3de16688a93d64154dea1f5517d3e9e80b97b080 (diff)
[1.1.X] Updated the docs to suggest using ``*args, **kwargs`` when implementing model save methods. Thanks to Jeff Croft for the report.
Partial backport of r12118 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12119 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref/models')
-rw-r--r--docs/ref/models/instances.txt26
1 files changed, 16 insertions, 10 deletions
diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt
index 7a0606dafe..3b813ff54c 100644
--- a/docs/ref/models/instances.txt
+++ b/docs/ref/models/instances.txt
@@ -34,13 +34,15 @@ To save an object back to the database, call ``save()``:
.. method:: Model.save([force_insert=False, force_update=False])
-Of course, there are some subtleties; see the sections below.
-
.. versionadded:: 1.0
+ The ``force_insert`` and ``force_update`` arguments were added.
+
+If you want customized saving behavior, you can override this
+``save()`` method. See :ref:`overriding-model-methods` for more
+details.
-The signature of the ``save()`` method has changed from earlier versions
-(``force_insert`` and ``force_update`` have been added). If you are overriding
-these methods, be sure to use the correct signature.
+The model save process also has some subtleties; see the sections
+below.
Auto-incrementing primary keys
------------------------------
@@ -233,12 +235,16 @@ Deleting objects
.. method:: Model.delete()
- Issues a SQL ``DELETE`` for the object. This only deletes the object in the
- database; the Python instance will still be around, and will still have data
- in its fields.
+Issues a SQL ``DELETE`` for the object. This only deletes the object
+in the database; the Python instance will still be around, and will
+still have data in its fields.
+
+For more details, including how to delete objects in bulk, see
+:ref:`topics-db-queries-delete`.
- For more details, including how to delete objects in bulk, see
- :ref:`topics-db-queries-delete`.
+If you want customized deletion behavior, you can override this
+``delete()`` method. See :ref:`overriding-model-methods` for more
+details.
.. _model-instance-methods: