You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, it should tell you to check the console window for message about incorrect MIME type when loading toolbar.js (was text/plain for me, running on Windows O.S.). For me the error message was (sorry, in French): Le chargement du module à l’adresse « http://localhost:8000/static/debug_toolbar/js/toolbar.js » a été bloqué en raison d’un type MIME interdit (« text/plain »).
Second, the workarounds are complexe, involve global system configuration changes, are missing detailed steps and need to be performed on each developer's machine.
This resolved the issue for me without system-wide change.
May even want to add these steps as part of the installation instruction, to ensure it runs on any system.
The text was updated successfully, but these errors were encountered:
Thanks for your report! It does sound like a recurring frustrating experience for newcomers.
We have discussed this previously in #1336 and have decided to not add the workaround to the toolbar, and instead ask the Django devs to do something about it. I still think this would be the better way since this affects all development environments on Windows with broken mimetypes, and magically fixing it by installing the toolbar sounds totally non-obvious to me. That being said, we are in position to do something about it even if it's not really out issue, and we could point users to the workaround too, maybe with the necessary warnings.
Agreed that we should include the error message we're expecting to see. @blep would you be interested in creating a PR to include that information in the docs?
On the problem in general, I wonder if we could write some JS to detect when the file fails to load to present better information to the user. Perhaps we load it into the toolbar info panel in #2033 or the static files panel?
@tim-schilling I'll look into making a PR for the documentation to indicate that users should check the console for messages and to suggest the simpler workaround I provided.
If I followed the chain correctly, #1336 forwards to Django ticket #32041 which forwards to python/cpython#54760, which has been closed. So as far as I understand, there is no pending action to fix the root cause of this issue.
The troubleshooting documentation makes it difficult for new Django developers like me who follow the Django tutorial and run into an issue:
https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#troubleshooting
Le chargement du module à l’adresse « http://localhost:8000/static/debug_toolbar/js/toolbar.js » a été bloqué en raison d’un type MIME interdit (« text/plain »).
A much simpler work-around is to add the following to your settings.py, which forces the MIME type of .js files:
This resolved the issue for me without system-wide change.
May even want to add these steps as part of the installation instruction, to ensure it runs on any system.
The text was updated successfully, but these errors were encountered: