[Answer]-Why do I not see Django exceptions in the browser under OpenShift?

1👍

I don’t know zilch about OpenShift, but

  1. you may have to configure your loggers (https://docs.djangoproject.com/en/1.6/topics/logging/#configuring-logging) and
  2. you have to restart the wsgi processes when you make some changes to your settings.

Now I strongly advise you to NOT set DEBUG=True on a production server – with a properly configured logger and SMTP server you should get all unhandled exceptions by mail.

As a last point: if you have something like a syntax error or such, you may not even get to the point where Django can do any logging. In this case what info you can get is up to the server process itself. BUT there’s no reason you should get a SyntaxError on a production server anyway, cause you shouldn’t be editing code on production…

0👍

To my horror… it turns out I simply hadn’t set DEBUG=True! I could have sworn I had set it in settings.py at some point but my commit history strongly suggests I’m wrong.

With DEBUG=True in my wsgi/settings.py I can now debug my application on OpenShift.

Apologies for the noise.

Doug

👤Doug

Leave a comment