简体   繁体   English

在 Django 中使用 heroku 时出现 STATIC_ROOT 错误

[英]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.

相关问题 使用静态根路径django的heroku deploy错误。 static_root未设置为文件系统路径 - heroku deploy error with static root path django. static_root not set to file system path Python Django:您正在使用 staticfiles 应用程序,而没有设置 STATIC_ROOT 设置 - Python Django: You're using the staticfiles app without having set the STATIC_ROOT setting Django 中的 STATIC_ROOT 设置 - STATIC_ROOT setting in Django django.core.exceptions.ImproperlyConfigured:您使用的是静态文件应用程序,而没有将 STATIC_ROOT 设置设置为文件系统路径 - django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path Python Django:您使用的是静态文件应用程序,而没有将 STATIC_ROOT 设置设置为文件系统路径 - Python Django: You're using the staticfiles app without having set the STATIC_ROOT setting setting to a filesystem path Django,没有保存在STATIC_ROOT文件夹中 - Django, nothing saved in STATIC_ROOT folder django static_root的理解-IOError-?? - django static_root understanding - IOError - ?? Django 1.8 中的 STATIC_ROOT 设置 - STATIC_ROOT setup in Django 1.8 在Django settings.py文件中指定STATIC_ROOT STATIC_URL时出错 - Getting error in specifying STATIC_ROOT STATIC_URL in Django settings.py file 您正在使用 staticfiles 应用程序,而没有将 STATIC_ROOT 设置设置为文件系统路径 - You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM