diff options
| author | Timo Graham <timograham@gmail.com> | 2010-12-27 23:46:06 +0000 |
|---|---|---|
| committer | Timo Graham <timograham@gmail.com> | 2010-12-27 23:46:06 +0000 |
| commit | 08cec1f5088a050730a70a1eee6bb0263a4892f5 (patch) | |
| tree | a4c305829a9177cb9a25453b709b8a1d9ecb4461 /docs | |
| parent | 5ba961e2674110d5319a33799de422cf532ace72 (diff) | |
Fixed #12313 - Add a note that QuerySet.delete() doesn't necessarily call obj.delete(). thanks FunkyELF for the suggestion.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15071 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/db/models.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt index 17d66d777a..f276bc0108 100644 --- a/docs/topics/db/models.txt +++ b/docs/topics/db/models.txt @@ -751,6 +751,14 @@ built-in model methods, adding new arguments. If you use ``*args, **kwargs`` in your method definitions, you are guaranteed that your code will automatically support those arguments when they are added. +.. admonition:: Overriding Delete + + Note that the :meth:`~Model.delete()` method for an object is not + necessarily called when :ref:`deleting objects in bulk using a + QuerySet<topics-db-queries-delete>`. To ensure customized delete logic + gets executed, you can use :data:`~django.db.models.signals.pre_save` + and/or :data:`~django.db.models.signals.post_save` signals. + Executing custom SQL -------------------- |
