[Django]-Static file issues with Heroku and Django

11πŸ‘

βœ…

I think the issue is that your static directory is empty so git doesn’t track it, so when Heroku tries to build your project the directory doesn’t exist and you get that error.

If you add an empty file called .keep in the static directory and add it to git then you can work around this issue.

πŸ‘€D. Evans

2πŸ‘

For others and the future me: https://github.com/not-kennethreitz/flango/issues/3 πŸ˜‰

STATIC_TMP = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'

os.makedirs(STATIC_TMP, exist_ok=True)
os.makedirs(STATIC_ROOT, exist_ok=True)
πŸ‘€maersu

Leave a comment