why my django admin site does not have the css style

后端 未结 19 1966
南笙
南笙 2020-12-02 07:49

I make a Django admin site using Django development version

But it does not have a CSS style :

\"alt

19条回答
  •  南笙
    南笙 (楼主)
    2020-12-02 08:14

    Failing after trying 1000s of suggestions, I finally found a solution that helped. Here is what I tried and what I was using. I am using django-1.11 and nginx web server. Firstly, I made sure that my CSS/js files are not getting 404 in browser's console. After that, I could see a warning

    Resource interpreted as Stylesheet but transferred with mime type text/plain

    I found the base.html in admin templates and removed

    type="text/css"

    and now the lines looks like this:

     
    

    This fixed the issue for me.

提交回复
热议问题