diff -r 6d68cf0600e5 django/contrib/admin/actions.py
a
|
b
|
|
68 | 68 | } |
69 | 69 | |
70 | 70 | # Display the confirmation page |
71 | | return render_to_response(modeladmin.delete_confirmation_template or [ |
| 71 | return render_to_response(modeladmin.delete_selected_confirmation_template or [ |
72 | 72 | "admin/%s/%s/delete_selected_confirmation.html" % (app_label, opts.object_name.lower()), |
73 | 73 | "admin/%s/delete_selected_confirmation.html" % app_label, |
74 | 74 | "admin/delete_selected_confirmation.html" |
diff -r 6d68cf0600e5 django/contrib/admin/options.py
a
|
b
|
|
206 | 206 | change_form_template = None |
207 | 207 | change_list_template = None |
208 | 208 | delete_confirmation_template = None |
| 209 | delete_selected_confirmation_template = None |
209 | 210 | object_history_template = None |
210 | 211 | |
211 | 212 | # Actions |
diff -r 6d68cf0600e5 docs/ref/contrib/admin/index.txt
a
|
b
|
|
741 | 741 | |
742 | 742 | Path to a custom template, used by :meth:`history_view`. |
743 | 743 | |
| 744 | .. attribute:: ModelAdmin.delete_selected_confirmation_template |
| 745 | |
| 746 | .. versionadded:: 1.2 |
| 747 | |
| 748 | Path to a custom template, used by the ``delete_selected`` action method |
| 749 | for displaying a confirmation page when deleting one or more objects. See |
| 750 | the :ref:`actions documentation<ref-contrib-admin-actions>`. |
| 751 | |
744 | 752 | |
745 | 753 | .. _model-admin-methods: |
746 | 754 | |
diff -r 6d68cf0600e5 tests/regressiontests/admin_views/models.py
a
|
b
|
|
119 | 119 | add_form_template = 'custom_admin/add_form.html' |
120 | 120 | object_history_template = 'custom_admin/object_history.html' |
121 | 121 | delete_confirmation_template = 'custom_admin/delete_confirmation.html' |
| 122 | delete_selected_confirmation_template = 'custom_admin/delete_selected_confirmation.html' |
122 | 123 | |
123 | 124 | def changelist_view(self, request): |
124 | 125 | "Test that extra_context works" |
diff -r 6d68cf0600e5 tests/templates/custom_admin/delete_selected_confirmation.html
-
|
+
|
|
| 1 | {% extends "admin/delete_selected_confirmation.html" %} |