Heroku Django DEBUG Setting not applied -


i have running production django application on heroku. unfortunately, haven't been able turn off debug setting on heroku. turning off locally works fine, when pushed heroku (after heroku config:set debug=false), doesn't apply.

the error pages still default debug ones instead of 404, 403, , 500 templates in our template root.

i have tried using django_debug setting in case there environment conflicts debug, , casting result boolean in settings file. heroku config shows settings in environment correct. on django 1.3, heroku cedar.

any tips or solutions?

does django settings.py file in environment?

it not, default, care you've set in environment (via "config:set"). if you're "casting" environment boolean, make sure you're casting correctly. bool('false') still true.

it's simplest detect if environment variable exists don't have worry type casting or specific formats of configuration.

debug = os.environ.get('debug', false)

to disable debug, remove variable environment instead of trying type cast... seems more reliable , fool proof. config:unset debug


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -