#11949 closed (fixed)
delete_selected action incorrectly uses AdminSite.delete_confirmation_template
| Reported by: | Ben Davis | Owned by: | Ben Davis |
|---|---|---|---|
| Component: | contrib.admin | Version: | 1.1 |
| Severity: | Keywords: | delete selected override template | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
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.
Attachments (2)
Change History (10)
comment:1 by , 16 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
by , 16 years ago
| Attachment: | delete-selected-confirmation-template-override.diff added |
|---|
comment:2 by , 16 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:3 by , 16 years ago
| Triage Stage: | Accepted → Unreviewed |
|---|
comment:4 by , 16 years ago
| milestone: | → 1.2 |
|---|---|
| Patch needs improvement: | set |
| Triage Stage: | Unreviewed → Accepted |
by , 16 years ago
| Attachment: | 11949-r12889-with-docs.diff added |
|---|
Patch by bendavis78 updated to r12889 plus a documentation blurb addition
comment:5 by , 16 years ago
| Patch needs improvement: | unset |
|---|
comment:6 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Pushing into 1.2 because of the potential for displaying the wrong list of deleted objects. Marking 'needs improvement' because this patch should be checked against the recent changes for #6191. There might not actually be a problem, but it warrants closer inspection.