up vote
4
down vote
favorite
1
|
when i runserver the django admin is missing css.The web console says that style sheet was not loaded because its MIME type,"application/x-css", is not "text/css". This is my settings.py file Django settings for mysite project.
)
|
|||
add a comment
|
up vote
7
down vote
accepted
|
I just ran into the same problem. And it seems you are right about Dreamweaver. Adding above mentioned strings into settings.py didn't helped me. I have run search for
It took me two iterations and I can not say for sure which one was the right shot as it might needed some time to update some cache, etc. Though I changed it at two locations:
I renamed (by adding leading '--' so that it could be recovered if necessary) keys/records related to After that the issue was resolved and Django CSS styles were correctly applied as it was expected. |
||||||||||||
add a comment
|
up vote
4
down vote
|
A little late answer but this needs to be put here for completeness. I also got this strange error on one development system (I didn't get it on other development systems for the same project). Maybe it is related to the fact that Dreamweaver (which can open css files) was installed on this system? In any case, to resolve the issue I added the following in my settings.py: import mimetypes mimetypes.add_type("text/css", ".css", True) This will add (and replace if already exists) the correct mimetype for css in your mimetypes list. In case you don't want to put it in your settings.py, add it to the |
||||||||||||||||||||
add a comment
|