Kaydet (Commit) 452abf7b authored tarafından Tim Graham's avatar Tim Graham

[2.1.x] Fixed #29398 -- Doc'd that cascade deletion doesn't call delete() of related models.

Backport of e038f98b from master
üst 7e875aa0
......@@ -1257,6 +1257,11 @@ The possible values for :attr:`~ForeignKey.on_delete` are found in
Cascade deletes. Django emulates the behavior of the SQL constraint ON
DELETE CASCADE and also deletes the object containing the ForeignKey.
:meth:`.Model.delete` isn't called on related models, but the
:data:`~django.db.models.signals.pre_delete` and
:data:`~django.db.models.signals.post_delete` signals are sent for all
deleted objects.
* .. attribute:: PROTECT
Prevent deletion of the referenced object by raising
......
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