Skip to main content
 首页 » 编程设计

python之尝试在 Heroku : Application Error 上启动 django 应用程序

2025年05月04日12wuhuacong

我正在使用这个 tutorial尝试在 Heroku 上启动 Django 网络应用程序。

获取应用程序错误:应用程序发生错误,无法提供您的页面。请稍后重试。如果您是应用程序所有者,请查看您的日志以了解详细信息。

heroku 日志:

2014-12-16T09:28:40.524655+00:00 heroku[run.3259]: Starting process with command `python manage.py createsuperuser` 
2014-12-16T09:28:40.780639+00:00 heroku[run.3259]: State changed from starting to up 
2014-12-16T09:28:56.130238+00:00 heroku[run.3259]: Process exited with status 0 
2014-12-16T09:28:56.139256+00:00 heroku[run.3259]: State changed from up to complete 
2014-12-16T09:29:06.983439+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shielded-reef-1163.herokuapp.com request_id=36ca5f9e-ed07-4b6e-96fb-767d70962e84 fwd="71.198.214.186" dyno= connect= service= status=503 bytes= 
2014-12-16T09:29:08.063637+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=shielded-reef-1163.herokuapp.com request_id=0f3775df-0c97-4bc0-acf2-63e12130af39 fwd="71.198.214.186" dyno= connect= service= status=503 bytes= 
2014-12-16T09:29:08.785681+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shielded-reef-1163.herokuapp.com request_id=84fe76f2-dc74-4995-9cf9-d87cec886432 fwd="71.198.214.186" dyno= connect= service= status=503 bytes= 
2014-12-16T09:29:09.738623+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=shielded-reef-1163.herokuapp.com request_id=cb87da0c-d6c3-4a27-a226-e2194343a633 fwd="71.198.214.186" dyno= connect= service= status=503 bytes= 

有人对如何解决这个问题有任何指导吗?

请您参考如下方法:

是的!我通过安装 django-toolbelt 修复了它 然后运行 pip freeze requirements.txt

并将我的 Procfile 更新为 网络:gunicorn myapp.wsgi