Python-在Heroku上部署Django应用时出错

时间:2018-07-01 12:57:43

标签: python django heroku

我按照here上的步骤进行了配置,一切都很好,也许错过了一些东西。将代码推送到git。但是当我运行命令git push --set-upstream heroku master时,出现以下错误。

错误

remote:        ModuleNotFoundError: No module named 'django_heroku'
remote:
remote:  !     Error while running '$ python manage.py collectstatic --noinput'.
remote:        See traceback above for details.
remote:
remote:        You may need to update application code to resolve this error.
remote:        Or, you can disable collectstatic for this application:
remote:
remote:           $ heroku config:set DISABLE_COLLECTSTATIC=1
remote:
remote:        https://devcenter.heroku.com/articles/django-assets
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...

我pip安装了django_heroku模块并编写了这段代码

import django_heroku
django_heroku.settings(locals())

在settings.py的最底部,那么这里出了什么问题?

0 个答案:

没有答案