CSS not loading wrong MIME type Django

后端 未结 5 2053
星月不相逢
星月不相逢 2020-12-03 21:59

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

Resour         


        
5条回答
  •  旧巷少年郎
    2020-12-03 22:45

    Adding following snippet into settings.py file may fix your problem:

    import mimetypes
    mimetypes.add_type("text/css", ".css", True)
    

提交回复
热议问题