27👍
I found solution here How to set content type of JavaScript files in Django
#settings.py
if DEBUG:
import mimetypes
mimetypes.add_type("application/javascript", ".js", True)
21👍
Expanding on drewslee answer
The solution to the problem is indicated in the documentation
- For Windows, you need to edit the registry. Set
HKEY_CLASSES_ROOT\.js\Content Type
totext/javascript
.
- Django model save – override method not invoked during migrations
- Could not find a version that satisfies the requirement django (from versions: ) No matching distribution found for django
- FileField Size and Name in Template
7👍
I have faced the problem and it was fixed after edit the Windows registry. I just Set HKEY_CLASSES_ROOT.js\Content Type from text/plain to text/javascript.
Now the problem is solved!
- How do I serve media files in a local Django environment?
- Proper declaration of an empty Django PostgreSQL JSONField default value in migration file
- Django annotate and count: how to filter the ones to include in count
- Django: model has two ManyToMany relations through intermediate model
2👍
I faced the same error. It was resolved once I updated the HKEY_CLASSES_ROOT.js\Content Type
from text/plain
to text/javascript
in my Windows using RegistryEditor
.
After that I had to refresh my browser cache to be able to see the toolbar
1👍
Clear your browsers Cache
If you configured the settings.py and the urls.py as the documentation page implies… Just go to your browser clear the data section right under the privacy policy and clear your browser’s cache.
That works for me 🙂
- Should south migration files be added to source control?
- Django + celery – How do I set up a crontab schedule for celery in my django app?
- Celery task and customize decorator