Django Admin delete_view could benefit from extension points
|Reported by:||Chris Wilson||Owned by:||Becky Smith|
|Cc:||Chris Wilson||Triage Stage:||Accepted|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||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.
Change History (4)
comment:1 Changed 5 years ago by
|Component:||Uncategorized → contrib.admin|
|Triage Stage:||Unreviewed → Accepted|
|Type:||Uncategorized → New feature|