我試圖在Heroku上部署此應用程序https://bitbucket.org/hybird/creme_crm-1.2。 我跟着引導https://devcenter.heroku.com/articles/django 該應用程序使用Django開發服務器或gunicorn正常工作在本地服務器上用「工頭開始」,但未能在Heroku上,出現此錯誤:Django應用程序在本地正常工作,但在Heroku上失敗
[INFO] Starting gunicorn 0.14.6
Starting gunicorn 0.14.6
[INFO] Listening at: http://0.0.0.0:16635 (2)
Listening at: http://0.0.0.0:16635 (2)
[INFO] Using worker: sync
Using worker: sync
[INFO] Booting worker with pid: 5
Booting worker with pid: 5
response = view_func(request, *args, **kwargs)
File "/app/.heroku/venv/lib/python2.7/site-packages/django/views/decorators/cache.py", line 79, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "/app/.heroku/venv/lib/python2.7/site-packages/django/contrib/auth/views.py", line 69, in login
context_instance=RequestContext(request, current_app=current_app))
File "/app/.heroku/venv/lib/python2.7/site-packages/django/template/context.py", line 172, in __init__
for processor in get_standard_processors() + processors:
File "/app/.heroku/venv/lib/python2.7/site-packages/django/template/context.py", line 150, in get_standard_processors
raise ImproperlyConfigured('Error importing request processor module %s: "%s"' % (module, e))
ImproperlyConfigured: Error importing request processor module creme_core.context_processors: "No module named creme"
我有一個requirements.txt文件,但creme_core已經在我推送到Heroku的源代碼中,它是Web應用程序的一部分。正如我所說的應用程序在本地主機上正常工作。 – madmed
經過一番研究後,它看起來像一個與您的要求無關的錯誤。這是更多的本地變量配置錯誤。具體來說,它看起來像是與您的設置文件中的上下文處理器var有關 –