{% extends "admin/change_list.html" %} {% load i18n %} {% load i18n admin_urls static admin_list %} {% block object-tools %} {% endblock %} {% block extrahead %} {% endblock %} {% block content %} {{ block.super }} {% endblock %} This code adds an event listener to the close button that will set the display style property of the modal to "none" when clicked, effectively hiding the modal.