Heroku Django-Admin 500 Error?

A new application has been deployed for the Heroku application, which works fine on myapp.herokuapp.com but gives a 500 Server Error if I try to access the admin backend on myapp.herokuapp.com/admin

INSTALLED_APPS = ( ... 'django.contrib.admin', 'gunicorn', 'storages', # 'django.contrib.admindocs', ) 

Here is an excerpt from the magazine:

 2013-07-10T17:35:28.893320+00:00 heroku[web.1]: Starting process with command `python manage.py run_gunicorn -b 0.0.0.0:27294 -w 3 --log-level info` 2013-07-10T17:35:32.298226+00:00 app[web.1]: 2013-07-10 13:35:32 [2] [INFO] Starting gunicorn 0.17.4 2013-07-10T17:35:32.299005+00:00 app[web.1]: 2013-07-10 13:35:32 [2] [INFO] Using worker: sync 2013-07-10T17:35:32.298932+00:00 app[web.1]: 2013-07-10 13:35:32 [2] [INFO] Listening at: http://0.0.0.0:27294 (2) 2013-07-10T17:35:32.312781+00:00 app[web.1]: 2013-07-10 13:35:32 [11] [INFO] Booting worker with pid: 11 2013-07-10T17:35:32.388874+00:00 app[web.1]: 2013-07-10 13:35:32 [12] [INFO] Booting worker with pid: 12 2013-07-10T17:35:32.495370+00:00 heroku[web.1]: State changed from starting to up 2013-07-10T17:35:32.524196+00:00 app[web.1]: 2013-07-10 13:35:32 [13] [INFO] Booting worker with pid: 13 2013-07-10T17:35:59.929850+00:00 heroku[router]: at=info method=GET path=/ host=myapp.herokuapp.com fwd="64.119.130.116" dyno=web.1 connect=0ms service=190ms status=200 bytes=12220 2013-07-10T17:36:04.363323+00:00 heroku[router]: at=info method=GET path=/admin host=myapp.herokuapp.com fwd="64.119.130.116" dyno=web.1 connect=0ms service=4ms status=301 bytes=5 2013-07-10T17:36:04.872523+00:00 heroku[router]: at=info method=GET path=/admin/ host=myapp.herokuapp.com fwd="64.119.130.116" dyno=web.1 connect=0ms service=481ms status=500 bytes=38 

What settings will cause the application to work fine, but you get a 500 / admin error? What I probably don’t notice or see? Thanks.

+4
source share
2 answers

Thanks to Magnus’s recommendation, I added a sentinel to my project and identified a postgres DatabaseError problem: a relationship due to a project application that I did not successfully transfer to the hero.

Fixed just fake and completing the rest of the migration.

 heroku run python manage.py migrate app 0016 --fake heroku run python manage.py migrate 
+4
source
  • You can add a getentry addon and get the exception trace remaining in DEBUG=False during production.

  • You can also set up a regular email notification for errors as an administrator email.

Without any information about the details of the errors, it will be difficult for you to give advice.

+3
source

Source: https://habr.com/ru/post/1490769/


All Articles