Skip to content

Commit

Permalink
settings: Add debug toolbar settings to environ
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurocon committed Sep 2, 2024
1 parent a405b22 commit ef308e8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions amelie/settings/environ.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ef308e8

Please sign in to comment.