Django staticfiles app help

后端 未结 5 1389
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-28 18:36

I\'ve having a little issue with Django\'s staticfiles app.

I have added

\'django.contrib.staticfiles\',

to my INSTALLED_APPS and

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-28 19:18

    First of all, make sure that you have static serve enabled in your urls.py FOR DEVELOPMENT ONLY.

    Also, you may have an extra slash in there. If your STATIC_URL == '/static/', then

    {{ STATIC_URL }}/css/style.css should be {{ STATIC_URL }}css/style.css.

提交回复
热议问题