Fixed #13251 -- Made pre/post_delete signals dispatch the origin.

This commit is contained in:
mgaligniana 2021-12-27 23:32:07 -03:00 committed by Mariusz Felisiak
parent f1905db6c0
commit fa235004dd
9 changed files with 112 additions and 17 deletions

View file

@ -195,6 +195,12 @@ Arguments sent with this signal:
``using``
The database alias being used.
``origin``
.. versionadded:: 4.1
The origin of the deletion being the instance of a ``Model`` or
``QuerySet`` class.
``post_delete``
---------------
@ -219,6 +225,12 @@ Arguments sent with this signal:
``using``
The database alias being used.
``origin``
.. versionadded:: 4.1
The origin of the deletion being the instance of a ``Model`` or
``QuerySet`` class.
``m2m_changed``
---------------

View file

@ -249,7 +249,9 @@ Serialization
Signals
~~~~~~~
* ...
* The :data:`~django.db.models.signals.pre_delete` and
:data:`~django.db.models.signals.post_delete` signals now dispatch the
``origin`` of the deletion.
Templates
~~~~~~~~~