Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.2.X] Fixed #12313 - Add a note that QuerySet.delete() doesn't nece…

…ssarily call obj.delete(). thanks FunkyELF for the suggestion.

Backport of r15071 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15072 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit d5970df38e78958e732ee628ed8ced45f58f0b84 1 parent 93e4227
Tim Graham authored December 27, 2010

Showing 1 changed file with 8 additions and 0 deletions. Show diff stats Hide diff stats

  1. 8  docs/topics/db/models.txt
8  docs/topics/db/models.txt
@@ -751,6 +751,14 @@ built-in model methods, adding new arguments. If you use ``*args,
751 751
 **kwargs`` in your method definitions, you are guaranteed that your
752 752
 code will automatically support those arguments when they are added.
753 753
 
  754
+.. admonition:: Overriding Delete
  755
+
  756
+    Note that the :meth:`~Model.delete()` method for an object is not
  757
+    necessarily called when :ref:`deleting objects in bulk using a
  758
+    QuerySet<topics-db-queries-delete>`. To ensure customized delete logic
  759
+    gets executed, you can use :data:`~django.db.models.signals.pre_save`
  760
+    and/or :data:`~django.db.models.signals.post_save` signals.
  761
+
754 762
 Executing custom SQL
755 763
 --------------------
756 764
 

0 notes on commit d5970df

Please sign in to comment.
Something went wrong with that request. Please try again.