Issue
I have installed virtualenv in my localhost to run a django app with 1.8 version but when running it the css and js files doesn't load.
I get
Resource interpreted as Stylesheet but transferred with MIME type application/x-css
I have tried some options but they don't solve the issue either. I am running the same configuration on other PC and it works.
My HTML loads the css with :
<link href="/static/css/bootstrap.css" rel="stylesheet" type="text/css">
Solution
Adding following snippet into settings.py
file may fix your problem:
import mimetypes
mimetypes.add_type("text/css", ".css", True)
Answered By - Andriy Ivaneyko
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.