diff options
author | Magnus Hagander | 2019-12-21 14:02:05 +0000 |
---|---|---|
committer | Magnus Hagander | 2019-12-21 14:02:05 +0000 |
commit | a62eb81a1785b97b07667ed03add3fc63b7cc06f (patch) | |
tree | 938ada09576096af5b6c0b346fa96e9e7eb7ceb5 /postgresqleu/util/middleware.py | |
parent | 0972936b7aa607bac77c6762bff4aa5e95b2f935 (diff) |
Allow a model to prevent the backend editors from deleting it
By definiting a method called validate_object_delete, the model can
raise a ValidationError which will act the same way as an object
attached via a foreign key in how it prevents the deletion of the
object.
Diffstat (limited to 'postgresqleu/util/middleware.py')
0 files changed, 0 insertions, 0 deletions