send all_objects_to_be_deleted in the pre_delete signal
|Reported by:||Owned by:||nobody|
|Cc:||Carl Meyer, plandry@…, cgieringer||Triage Stage:||Design decision needed|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||yes|
when django deletes an object, it also deletes all related objects.
it would be great to send the list of "to be deleted objects" in the pre_delete signal, because then a developer could implement in his application things like only-delete-object-when-there-are-no-related-objects (by raising an Exception in the listener-function), etc.
it can be implemented by an one-line change in db/models/query.py (patch attached).
Change History (14)
comment:1 Changed 9 years ago by
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Ready for checkin|
comment:2 Changed 9 years ago by
|Patch needs improvement:||set|
|Triage Stage:||Ready for checkin → Design decision needed|