-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation: simplify troubleshooting of incorrect mime types for .js static files #2046
Comments
Thanks for your report! It does sound like a recurring frustrating experience for newcomers. |
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. |
…d for incorrect MIME type for toolbar.js, and example of console error message.
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: