Ticket #11949: delete-selected-confirmation-template-override.diff

File delete-selected-confirmation-template-override.diff, 2.1 KB (added by bendavis78, 6 years ago)
  • django/contrib/admin/options.py

     
    193193    change_form_template = None
    194194    change_list_template = None
    195195    delete_confirmation_template = None
     196    delete_selected_confirmation_template = None
    196197    object_history_template = None
    197198
    198199    # Actions
  • django/contrib/admin/actions.py

     
    7676    }
    7777
    7878    # Display the confirmation page
    79     return render_to_response(modeladmin.delete_confirmation_template or [
     79    return render_to_response(modeladmin.delete_selected_confirmation_template or [
    8080        "admin/%s/%s/delete_selected_confirmation.html" % (app_label, opts.object_name.lower()),
    8181        "admin/%s/delete_selected_confirmation.html" % app_label,
    8282        "admin/delete_selected_confirmation.html"
  • tests/regressiontests/admin_views/models.py

     
    108108    change_form_template = 'custom_admin/change_form.html'
    109109    object_history_template = 'custom_admin/object_history.html'
    110110    delete_confirmation_template = 'custom_admin/delete_confirmation.html'
     111    delete_selected_confirmation_template = 'custom_admin/delete_selected_confirmation.html'
    111112
    112113    def changelist_view(self, request):
    113114        "Test that extra_context works"
  • tests/templates/custom_admin/delete_selected_confirmation.html

     
     1{% extends "admin/delete_selected_confirmation.html" %}
Back to Top