【问题标题】:Can't load static files in Django with right setting无法使用正确的设置在 Django 中加载静态文件
【发布时间】:2021-03-28 13:33:57
【问题描述】:

即使我确定 settings.py 一切正常,也无法从名为“gameMuster”的应用中加载静态文件。

Project structure

Statics confs

Installed apps

【问题讨论】:

标签: django static


【解决方案1】:

我不知道,但试试这个

STATICFILES_DIRS = [
    os.path.join(BASE_DIR, 'gameMuster/static')
]

【讨论】:

  • 在我和你的情况下,实际上加入函数仍然返回相同的路径。
  • 也许收集静态的?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2020-04-16
  • 2020-11-12
  • 2014-09-03
  • 1970-01-01
  • 2014-07-12
相关资源
最近更新 更多