Kaydet (Commit) 5c6316dc authored tarafından David Sanders's avatar David Sanders Kaydeden (comit) Tim Graham

Clarified that Model.delete() isn't called as a result of a cascading delete.

üst b47552b4
......@@ -835,9 +835,11 @@ code will automatically support those arguments when they are added.
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_delete`
and/or :data:`~django.db.models.signals.post_delete` signals.
QuerySet <topics-db-queries-delete>` or as a result of a :attr:`cascading
delete <django.db.models.ForeignKey.on_delete>`. To ensure customized
delete logic gets executed, you can use
:data:`~django.db.models.signals.pre_delete` and/or
:data:`~django.db.models.signals.post_delete` signals.
Unfortunately, there isn't a workaround when
:meth:`creating<django.db.models.query.QuerySet.bulk_create>` or
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment