enable toolbar seperate from debug logging

This commit is contained in:
smilerz 2023-03-29 15:52:46 -05:00
parent 3e8f0c3aae
commit 569143a7ee
No known key found for this signature in database
GPG Key ID: 39444C7606D47126
2 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,7 @@
# when unset: 1 (true) - dont unset this, just for development
DEBUG=0
SQL_DEBUG=0
DEBUG_TOOLBAR=0
# HTTP port to bind to
# TANDOOR_PORT=8080

View File

@ -25,6 +25,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = os.getenv('SECRET_KEY') if os.getenv('SECRET_KEY') else 'INSECURE_STANDARD_KEY_SET_IN_ENV'
DEBUG = bool(int(os.getenv('DEBUG', True)))
DEBUG_TOOLBAR = bool(int(os.getenv('DEBUG_TOOLBAR', True)))
SOCIAL_DEFAULT_ACCESS = bool(int(os.getenv('SOCIAL_DEFAULT_ACCESS', False)))
SOCIAL_DEFAULT_GROUP = os.getenv('SOCIAL_DEFAULT_GROUP', 'guest')
@ -158,7 +159,7 @@ MIDDLEWARE = [
'cookbook.helper.scope_middleware.ScopeMiddleware',
]
if DEBUG:
if DEBUG_TOOLBAR:
MIDDLEWARE += ('debug_toolbar.middleware.DebugToolbarMiddleware',)
INSTALLED_APPS += ('debug_toolbar',)