Heroku static files not loading, Django

前端 未结 5 484
春和景丽
春和景丽 2021-01-03 14:43

I\'m trying to push my Django project to Heroku, but it isn\'t loading the staticfiles.

I used this to setup the things, everything is fine but I\'m not able to fix

5条回答
  •  渐次进展
    2021-01-03 15:29

    Your STATICFILES_DIRS setting is wrong. It should be pointing to the actual location of the "static" directory containing the files:

    STATICFILES_DIRS = (
        os.path.join(BASE_DIR, 'static'),
    )
    

提交回复
热议问题