You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path

前端 未结 3 1425
感情败类
感情败类 2021-01-12 16:51

I have gone through every other answer and cannot seem to get anything to work for me. I am following a tutorial and trying to push my master branch to heroku a

3条回答
  •  长发绾君心
    2021-01-12 17:20

    Summarizing ratrace's answer, the main solution is to add

    STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
    

    to settings.py. Where STATIC_ROOT is the destination to where static files are copied and from where they are served when deploying the Django app.

提交回复
热议问题