#1 By: dilshod, November 21st, 2013 00:55
I am following Getting Started with Django on Heroku tutorial to deploy my app. After I run foreman start:
| => foreman start
00:47:08 web.1 | started with pid 4465
00:47:09 web.1 | 2013-11-21 00:47:09  [INFO] Starting gunicorn 18.0
00:47:09 web.1 | 2013-11-21 00:47:09  [INFO] Listening at: http://0.0.0.0:5000 (4465)
00:47:09 web.1 | 2013-11-21 00:47:09  [INFO] Using worker: sync
00:47:09 web.1 | 2013-11-21 00:47:09  [INFO] Booting worker with pid: 4468
Then in Chrome I went to http://0.0.0.0:5000/rides/ (also http://localhost:5000/rides/), it is returning Server Error 500.
My project urls.py:
How can I troubleshoot this? Thank you for your help in advance.
#2 By: Ryan Daigle, November 21st, 2013 13:54
Hi @dilshod. Can you post the log output/stack trace from the exception?
#3 By: dilshod, November 21st, 2013 14:23
I was able to solve it. I had turned Debug off. I did
Debug = True
then it told me:
settings.DATABASES is improperly configured. Please supply the NAME value
In my settings.py, I had put this at the top:
from local_settings import *
except Exception as e:
Apparently, it should have been placed at the bottom of the file. That allowed me to test my app locally with Gunicorn with Foreman.
#4 By: Ryan Daigle, November 21st, 2013 14:36
Great, thanks for following up @dilshod!