send all_objects_to_be_deleted in the pre_delete signal
|Reported by:||Gábor Farkas <gabor@…>||Owned by:||nobody|
|Cc:||carljm, 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)
Changed 8 years ago by Gábor Farkas <gabor@…>
comment:1 Changed 8 years ago by Simon G <dev@…>
- Has patch set
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Ready for checkin
comment:2 Changed 8 years ago by jacob
- Patch needs improvement set
- Triage Stage changed from Ready for checkin to Design decision needed
comment:12 Changed 6 years ago by carljm
- Resolution set to wontfix
- Status changed from new to closed