I am trying to use a django-bootstrap4 modal as a nag box to accept a privacy policy.
(I have a custom template filter to check whether this has already been accepted. I am not worried about that bit)
It should open whenever navigating to a new page. I have tried this solution, but the modal is not dismissable, not even with a close button. Neither does it shadow the page behind it.
I have imported the custom css using
<link href="/static/css/auto_modal.css" rel="stylesheet">, is this correct when using django-bootstrap?The code for the modal is in the base.html template. Is it possible to take it into a seperate template just for the modal?
I resorted to Javascript
make a my_javascript.js file in a static/js/ folder, containing
load it into the base.htmltemplate with
Then create your modal as usual. I'm still looking into getting this into a seperate html file.