As shown above, I want to call up a modal box through a button on the Django list page to confirm and cancel the operation. I don’t know how to operate the template.
The template of the list page is provided in the Django source code. If the ordinary template file can write the modal box code into the current template file, but the source code cannot be modified, if the template change_list.html of the list page can be made to include the modal The box code can be adjusted
Django will first look for the html file in the templates directory of your project
Once you know this, you can copy the corresponding html under your django admin to your templates directory
For example, your current link is /admin/a /b
You put the corresponding change_list.html in /templates/admin/a/b/change_list.html
I personally prefer not to rely too much on the admin backend, especially when there are a lot of customization requirements. I usually write a web app myself