Opened 14 years ago

Closed 2 years ago

#13251 closed New feature (fixed)

Add ability to know where an object was deleted from to pre/post delete signals

Reported by: skoom Owned by: Marcelo Galigniana
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords: signals
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Since deleting objects deletes related objects, it would be good to know the origin of the delete.

It lets the signal listeners know why an object is being delete. If it's deleted from a model.delete(), you know which instance initiated the delete and if it's from a queryset.delete() you know which queryset initiated the delete, with the models in that queryset. Using this you know if the instance is being deleted directly or because it's related to another instance.

Attachments (1)

changes.patch (2.6 KB ) - added by skoom 14 years ago.

Download all attachments as: .zip

Change History (14)

by skoom, 14 years ago

Attachment: changes.patch added

comment:1 by skoom, 14 years ago

Needs documentation: set

comment:2 by anonymous, 14 years ago

Needs tests: set

comment:3 by Russell Keith-Magee, 14 years ago

Component: Core frameworkDatabase layer (models, ORM)
Triage Stage: UnreviewedAccepted

comment:4 by Julien Phalip, 13 years ago

See a possibly related issue in #6870.

comment:5 by Luke Plant, 13 years ago

Type: New feature

comment:6 by Luke Plant, 13 years ago

Severity: Normal

comment:7 by Aymeric Augustin, 12 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:8 by Aymeric Augustin, 12 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:9 by Marcelo Galigniana, 2 years ago

Needs documentation: unset
Needs tests: unset
Owner: changed from nobody to Marcelo Galigniana
Status: newassigned

comment:10 by Mariusz Felisiak, 2 years ago

Needs documentation: set
Needs tests: set
Patch needs improvement: set

comment:11 by Marcelo Galigniana, 2 years ago

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

comment:12 by Mariusz Felisiak, 2 years ago

Triage Stage: AcceptedReady for checkin

comment:13 by Mariusz Felisiak, 2 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.
Back to Top