summaryrefslogtreecommitdiff
path: root/postgresqleu/util/middleware.py
diff options
context:
space:
mode:
authorMagnus Hagander2019-12-21 14:02:05 +0000
committerMagnus Hagander2019-12-21 14:02:05 +0000
commita62eb81a1785b97b07667ed03add3fc63b7cc06f (patch)
tree938ada09576096af5b6c0b346fa96e9e7eb7ceb5 /postgresqleu/util/middleware.py
parent0972936b7aa607bac77c6762bff4aa5e95b2f935 (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