aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorBonfaceKilz2021-08-19 11:37:23 +0300
committerBonfaceKilz2021-08-20 09:37:52 +0300
commit0fb00c0ce2e0c668508859e056f1132d67ad9243 (patch)
tree5d63d6bc5f681b7afb3d84df91a12326928e562f /wqflask
parentaaf28e6b2dc61469fa06816655208c0fc616f2e8 (diff)
downloadgenenetwork2-0fb00c0ce2e0c668508859e056f1132d67ad9243.tar.gz
startup_config.py: Add DebugToobarExtension for wsgi DEBUG mode
* wqflask/utility/startup_config.py (app_config): Add DebugToolbarExtension
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/utility/startup_config.py6
1 files changed, 5 insertions, 1 deletions
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("==========================================")