Django Admin delete_view could benefit from extension points
|Reported by:||Chris Wilson||Owned by:||nobody|
|Cc:||Chris Wilson||Triage Stage:||Accepted|
|Has patch:||yes||Needs documentation:||yes|
|Needs tests:||yes||Patch needs improvement:||no|
I want to increase control over who can delete what objects using the admin interface.
has_delete_permission(), which is fine, but then it calls
This is very hard to override without monkey-patching
get_deleted_objects(), because it requires replacing the whole of
delete_view just to change one line.
I propose calling a member method
get_deleted_objects(), which by default just calls the one from
util, to make it easy to override this behaviour.
I've attached a patch without tests, because the existing tests should check that this doesn't break anything.