What precisely are the functional differences between toggling the DEBUG
setting in a settings.py file of a Django app?
I first assumed
As of Django 1.6.2 it has been identified before that import errors are not necessarily caught in DEBUG=True
but certainly are in DEBUG=False
Simple example: Try importing your app's settings.py
(import yourapp.settings
) into one of your views and then try referencing a non-existent variable: settings.var_that_does_not_exist
. This will only be an issue (causing status 500 errors) for when DEBUG=False
for any views that reference that non-existent variable.