diff --git a/amelie/settings/environ.py b/amelie/settings/environ.py index d44753b..6c99512 100644 --- a/amelie/settings/environ.py +++ b/amelie/settings/environ.py @@ -49,6 +49,19 @@ def get_random_secret_key_no_dollar(): PYDEV_DEBUGGER = False PYDEV_DEBUGGER_IP = None +# Load the debug toolbar -- does not need to be changed in principle +if DEBUG_TOOLBAR: + def custom_show_toolbar(request): + return True + + # Order is important + INSTALLED_APPS = INSTALLED_APPS + ('debug_toolbar',) + MIDDLEWARE = ['debug_toolbar.middleware.DebugToolbarMiddleware'] + MIDDLEWARE + + DEBUG_TOOLBAR_CONFIG = { + 'SHOW_TOOLBAR_CALLBACK': '%s.%s' % (__name__, custom_show_toolbar.__name__), + } + # Do not redirect to HTTPS, because the nginx proxy container only listens on HTTP SECURE_SSL_REDIRECT = False