2

I install django debug toolbar and it did not appear in the browser, when I looked at the code, I saw that it was hidden. How can I fix this? enter image description here

Oleksandr
  • 206
  • 1
  • 2
  • 16
  • 1
    Does the button/tab appear on the right side of the browser window? Is there a error in the browser console? – schillingt Apr 02 '21 at 16:56
  • @schillingt i have this error in concole Failed to load module script: The server responded with a non-JavaScript MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec. – Oleksandr Apr 02 '21 at 16:57
  • 1
    Good news, this is a known issue: Check out the docs https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#troubleshooting let me know if that doesn't work for you. – schillingt Apr 02 '21 at 16:58
  • 1
    This is a known issue, see [here](https://django-debug-toolbar.readthedocs.io/en/latest/tips.html), your HTML file must include a body tag. – Ahmed I. Elsayed Apr 02 '21 at 17:10
  • @schillingt, sorry but it doesn't help, i install mailcap-fix and get this error again – Oleksandr Apr 03 '21 at 15:26
  • @AhmedI.Elsayed thx for your support, file incudes a body, html, head tags – Oleksandr Apr 03 '21 at 15:27

1 Answers1

5

Thank you all for your help, I solved this problem like this

if DEBUG:
    import mimetypes
    mimetypes.add_type("application/javascript", ".js", True)
Oleksandr
  • 206
  • 1
  • 2
  • 16