[英]Having an Error with STATIC_ROOT when using heroku in Django
django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path.
尽管我设置了 STATIC_ROOT,但出现此错误:
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
Check the static file root.检查静态文件根。 If it's on correct location.
如果它在正确的位置。 For heroku try to put that file on git.
对于 heroku,尝试将该文件放在 git 上。 I am assuming it's a blank directory so it's not being pushed to git repo.
我假设它是一个空白目录,所以它不会被推送到 git repo。 Put .keep kind of file and add/commit and try.
放置 .keep 类型的文件并添加/提交并尝试。 Hope it will solve your issue.
希望它能解决你的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.