Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#1014 closed enhancement (fixed)

Allow _pre_save and _pre_delete to stop save / delete

Reported by: django@… Owned by: adrian
Component: Metasystem Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


It'd be useful in some situations if a _pre_save or _pre_delete hook could signal that the saving or deleting shouldn't go ahead. Throwing an exception isn't the best way to handle it if it's not actually exceptional behaviour. For instance, in a version control system, on _pre_delete you might wish to alter the status to 'deleted' but stop the actual object from being deleted.

Attachments (1)

patch.diff (1.3 KB) - added by django@… 11 years ago.

Download all attachments as: .zip

Change History (2)

Changed 11 years ago by django@…

comment:1 Changed 10 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

This was made possible when we merged the magic-removal branch. You can now override save() and delete().

Note: See TracTickets for help on using tickets.
Back to Top