I have successfully deployed the django web app to heroku but it was giving application error
I have successfully deployed the Django web app to Heroku but it was giving an application error.
heroku logs
2010-09-16T15:13:46.677020+00:00 app[web.1]: Processing PostController#list (for 208.39.138.12 at 2010-09-16 15:13:46) [GET]
2010-09-16T15:13:46.677023+00:00 app[web.1]: Rendering template within layouts/application
2010-09-16T15:13:46.677902+00:00 app[web.1]: Rendering post/list
2010-09-16T15:13:46.678990+00:00 app[web.1]: Rendered includes/_header (0.1ms)
2010-09-16T15:13:46.698234+00:00 app[web.1]: Completed in 74ms (View: 31, DB: 40) | 200 OK [http://myapp.heroku.com/]
2010-09-16T15:13:46.723498+00:00 heroku[router]: at=info method=GET path="/posts" host=myapp.herokuapp.com" fwd="204.204.204.204" dyno=web.1 connect=1ms service=18ms status=200 bytes=975
2010-09-16T15:13:47.893472+00:00 app[worker.1]: 2 jobs processed at 16.6761 j/s, 0 failed ...
I also try to set DEBUG = True from Django's settings.py but no errors were showing.
This can be one of many things:
- You have to have your Procfile in your ROOT directory
- Heroku uses the wrong version of python, to change this, make a runtime.txt in your ROOT, and add something like:
python-3.10.5
on line 1. - Heroku didnt get your secret key (assuming you use something to read a .env file in your
settings.py
, you can do something like:heroku config:set SECRET_KEY="someSortOfKey"
- Heroku failed to get staticfiles.
I made a deployment to Heroku README here,
That may be of help.
In the README, skip ahead to #Deployment or #Debugging (both at the bottom of the README).
Hope this helps.