Last active
December 29, 2015 11:59
-
-
Save loic/7667109 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/docs/ref/models/relations.txt b/docs/ref/models/relations.txt | |
index 77f2e78..62e2294 100644 | |
--- a/docs/ref/models/relations.txt | |
+++ b/docs/ref/models/relations.txt | |
@@ -112,13 +112,13 @@ Related objects reference | |
.. versionchanged 1.7:: | |
- This method accepts a ``bulk`` argument. When ``bulk=False``, | |
- ``QuerySet.update()`` is replaced by multiple calls to ``Model.save()``, | |
- and ``QuerySet.delete()`` by multiple calls to ``Model.delete()``. | |
- This can be useful to ensure the model's ``save()`` and ``delete()`` | |
- are called or if you need the :data:`~django.db.models.signals.pre_save` | |
- and :data:`~django.db.models.signals.post_save` signals. Note that | |
- ``bulk=False`` comes at the expense of performance; default is ``True``. | |
+ For :class:`~django.db.models.ForeignKey` objects, this method accepts | |
+ a ``bulk`` argument to control whether or not to perform the operation | |
+ in bulk with ``QuerySet.update()``. If ``bulk=False`` the | |
+ ``save()`` method of each individual model instance is called therefore | |
+ triggering the :data:`~django.db.models.signals.pre_save` | |
+ and :data:`~django.db.models.signals.post_save` signals. Note that this | |
+ comes at the expense of performance; default is ``True``. | |
.. method:: clear() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For :class:
~django.db.models.ForeignKey
objects, this method accepts abulk
argument to control how to perform the operation. IfTrue
(the default),QuerySet.update()
is used. Ifbulk=False
, thesave()
method of each individual model instance is called instead. This triggers the :data:~django.db.models.signals.pre_save
and :data:~django.db.models.signals.post_save
signals and comes at the expense of performance.