delete_selected action incorrectly uses AdminSite.delete_confirmation_template
|Reported by:||Ben Davis||Owned by:||Ben Davis|
|Severity:||Keywords:||delete selected override template|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I believe this was just an oversight on the original developer's part. In django.contrib.admin.actions, in delete_selected, it was using AdminSite.delete_confirmation_template, which is actually not the right template. If someone was to override AdminSite.delete_confirmation_template, the delete_selected action would no longer work.
I've attached a simple patch that fixes this problem, and adds support for overriding delete_selected_confirmation_template.
Change History (10)
Changed 7 years ago by
comment:4 Changed 7 years ago by
|Patch needs improvement:||set|
|Triage Stage:||Unreviewed → Accepted|