From c421a4fd92990fa830f2f645df044b0f0f1fc32a Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 5 Apr 2010 12:02:27 +0000 Subject: Fixed #11949 -- Added a hook to allow ModelAdmin customization of the delete selected template. Thanks to bendavis78 for the report and patch, and Ramiro Morales for his cleanup work. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12916 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admin/actions.py | 2 +- django/contrib/admin/options.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'django') diff --git a/django/contrib/admin/actions.py b/django/contrib/admin/actions.py index 5cc2f811e4..69374626cc 100644 --- a/django/contrib/admin/actions.py +++ b/django/contrib/admin/actions.py @@ -68,7 +68,7 @@ def delete_selected(modeladmin, request, queryset): } # Display the confirmation page - return render_to_response(modeladmin.delete_confirmation_template or [ + return render_to_response(modeladmin.delete_selected_confirmation_template or [ "admin/%s/%s/delete_selected_confirmation.html" % (app_label, opts.object_name.lower()), "admin/%s/delete_selected_confirmation.html" % app_label, "admin/delete_selected_confirmation.html" diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py index 7d2904002e..6f66893c26 100644 --- a/django/contrib/admin/options.py +++ b/django/contrib/admin/options.py @@ -206,6 +206,7 @@ class ModelAdmin(BaseModelAdmin): change_form_template = None change_list_template = None delete_confirmation_template = None + delete_selected_confirmation_template = None object_history_template = None # Actions -- cgit v1.3