错误:You may need to update application code to resolve this error. remote: Or, you can disable collectstatic for this application: remote: $ heroku config:set DISABLE_COLLECTSTATIC=1
1. 控制台虚拟环境下输入:heroku config:set DISABLE_COLLECTSTATIC=1
2. 提示成功后:
在settings.py文件中加一条:
STATIC_ROOT = os.path.join(BASE_DIR, ‘static’)
特别注意这一条不要加在Heroku设置的那个if语句当中!!!要加在外边(比如if前面)