Add support for easily enabling the django debug toolbar

This requires the web server to also configure a static mapping for
/media/django_toolbar/ pointing into the django toolbar directories.
This commit is contained in:
Magnus Hagander
2020-08-07 13:37:05 +02:00
parent 11fdccb3bd
commit f5d99ed262
2 changed files with 19 additions and 0 deletions

View File

@ -162,5 +162,15 @@ FRONTEND_SMTP_RELAY = "magus.postgresql.org" # Where to relay use
OAUTH = {} # OAuth providers and keys
PGDG_ORG_ID = -1 # id of the PGDG organisation entry
# For debug toolbar, can then be fully configured in settings_local.py
DEBUG_TOOLBAR = False
INTERNAL_IPS = [
'127.0.0.1',
]
# Load local settings overrides
from .settings_local import *
if DEBUG and DEBUG_TOOLBAR:
MIDDLEWARE.append('debug_toolbar.middleware.DebugToolbarMiddleware')
INSTALLED_APPS.append('debug_toolbar')