Python Foreman启动导致服务器错误500

Python Foreman启动导致服务器错误500,python,django,heroku,gunicorn,foreman,Python,Django,Heroku,Gunicorn,Foreman,我正在按照Heroku教程上的Django入门来部署我的应用程序。首先在本地进行测试,我运行了foreman start: | => foreman start 00:47:08 web.1 | started with pid 4465 00:47:09 web.1 | 2013-11-21 00:47:09 [4465] [INFO] Starting gunicorn 18.0 00:47:09 web.1 | 2013-11-21 00:47:09 [4465] [INFO]

我正在按照Heroku教程上的Django入门来部署我的应用程序。首先在本地进行测试,我运行了foreman start:

| => foreman start
00:47:08 web.1  | started with pid 4465
00:47:09 web.1  | 2013-11-21 00:47:09 [4465] [INFO] Starting gunicorn 18.0
00:47:09 web.1  | 2013-11-21 00:47:09 [4465] [INFO] Listening at: http://0.0.0.0:5000 (4465)
00:47:09 web.1  | 2013-11-21 00:47:09 [4465] [INFO] Using worker: sync
00:47:09 web.1  | 2013-11-21 00:47:09 [4468] [INFO] Booting worker with pid: 4468
然后在Chrome中,我转到
http://0.0.0.0:5000/rides/
(也是
http://localhost:5000/rides/
),返回服务器错误500。 My project URL.py:

url(r'^rides/', include('rides.urls')),
url(r'^admin/', include(admin.site.urls)),
以下是我的文件:

web: gunicorn rides_project.wsgi
requirements.txt:

Django==1.6
South==0.8.3
dj-database-url==0.2.2
dj-static==0.0.5
django-localflavor==1.0
django-toolbelt==0.0.1
gunicorn==18.0
psycopg2==2.5.1
static==0.4
wsgiref==0.1.2

如何对此进行故障排除?提前谢谢你的帮助

您能否成功导航到/admin?如果是这样,我将确保您的设置设置为True,这样您就可以通过浏览器进行回溯,以帮助确定500错误的根本原因。

您是对的。我已经关掉了调试。打开时:settings.DATABASES配置不正确。请在my settings.py中提供名称值,我已将其放在顶部:`try:from local_settings import*,例外情况为e:pass`显然,它应该放在文件的底部。这让我可以和Foreman一起在本地用Gunicorn测试我的应用程序。