From 0fb00c0ce2e0c668508859e056f1132d67ad9243 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Thu, 19 Aug 2021 11:37:23 +0300 Subject: startup_config.py: Add DebugToobarExtension for wsgi DEBUG mode * wqflask/utility/startup_config.py (app_config): Add DebugToolbarExtension --- wqflask/utility/startup_config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'wqflask') diff --git a/wqflask/utility/startup_config.py b/wqflask/utility/startup_config.py index 56d0af6f..778fb64d 100644 --- a/wqflask/utility/startup_config.py +++ b/wqflask/utility/startup_config.py @@ -20,8 +20,12 @@ def app_config(): import os app.config['SECRET_KEY'] = str(os.urandom(24)) mode = WEBSERVER_MODE - if mode == "DEV" or mode == "DEBUG": + if mode in ["DEV", "DEBUG"]: app.config['TEMPLATES_AUTO_RELOAD'] = True + if mode == "DEBUG": + from flask_debugtoolbar import DebugToolbarExtension + app.debug = True + toolbar = DebugToolbarExtension(app) print("==========================================") -- cgit v1.2.3