Ticket #18996: 18996-1.diff

File 18996-1.diff, 1.4 KB (added by Elvard, 22 months ago)

Improved documentation

1diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt
2index f29cc28..a0a4a55 100644
3--- a/docs/topics/db/models.txt
4+++ b/docs/topics/db/models.txt
5@@ -762,13 +762,16 @@ built-in model methods, adding new arguments. If you use ``*args,
6 **kwargs`` in your method definitions, you are guaranteed that your
7 code will automatically support those arguments when they are added.
9-.. admonition:: Overriding Delete
11-    Note that the :meth:`~Model.delete()` method for an object is not
12-    necessarily called when :ref:`deleting objects in bulk using a
13-    QuerySet<topics-db-queries-delete>`. To ensure customized delete logic
14-    gets executed, you can use :data:`~django.db.models.signals.pre_delete`
15-    and/or :data:`~django.db.models.signals.post_delete` signals.
16+.. admonition:: Overridden model methods are not called on bulk operations
18+    Note that the :meth:`` and :meth:`~Model.delete()` methods
19+    for an object are not called when :ref:`updating<topics-db-queries-update>`
20+    and :ref:`deleting<topics-db-queries-delete>` objects in bulk using a
21+    Queryset. To ensure customized save and delete logic
22+    gets executed, you can use :data:`~django.db.models.signals.pre_save`,
23+    :data:`~django.db.models.signals.post_save`,
24+    :data:`~django.db.models.signals.pre_delete`
25+    or :data:`~django.db.models.signals.post_delete` signals.
27 Executing custom SQL
28 --------------------