Skip to content

Commit

Permalink
allow to override delete_confirmation_template
Browse files Browse the repository at this point in the history
uses the same logic as Django in django.contrib.admin.options.BaseModelAdmin.render_delete_form
  • Loading branch information
jrief committed Jun 14, 2022
1 parent b92bc29 commit 5ceccad
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cms/admin/placeholderadmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,16 @@ def delete_plugin(self, request, plugin_id):
}
request.current_app = self.admin_site.name
return TemplateResponse(
request, "admin/cms/page/plugin/delete_confirmation.html", context
request,
self.delete_confirmation_template
or [
"admin/{}/{}/delete_confirmation.html".format(
opts.app_label, opts.model_name
),
"admin/{}/delete_confirmation.html".format(opts.app_label),
"admin/cms/page/plugin/delete_confirmation.html",
],
context,
)

@xframe_options_sameorigin
Expand Down

0 comments on commit 5ceccad

Please sign in to comment.