Introducing Flask Debug Toolbar
Display useful information for debugging.
This commit is contained in:
@@ -712,6 +712,10 @@ class PillarServer(BlinkerCompatibleEve):
|
||||
|
||||
authentication.setup_app(self)
|
||||
|
||||
# Register Flask Debug Toolbar (disabled by default).
|
||||
from flask_debugtoolbar import DebugToolbarExtension
|
||||
DebugToolbarExtension(self)
|
||||
|
||||
for ext in self.pillar_extensions.values():
|
||||
self.log.info('Setting up extension %s', ext.name)
|
||||
ext.setup_app(self)
|
||||
@@ -722,6 +726,7 @@ class PillarServer(BlinkerCompatibleEve):
|
||||
self._config_user_caps()
|
||||
|
||||
# Only enable this when debugging.
|
||||
# TODO(fsiddi): Consider removing this in favor of the routes tab in Flask Debug Toolbar.
|
||||
# self._list_routes()
|
||||
|
||||
def setup_db_indices(self):
|
||||
|
@@ -270,3 +270,14 @@ STATIC_FILE_HASH = ''
|
||||
# all API endpoints do not need it. On the views that require it, we use the
|
||||
# current_app.csrf.protect() method.
|
||||
WTF_CSRF_CHECK_DEFAULT = False
|
||||
|
||||
# Flask Debug Toolbar. Enable it by overriding DEBUG_TB_ENABLED in config_local.py.
|
||||
DEBUG_TB_ENABLED = False
|
||||
DEBUG_TB_PANELS = [
|
||||
'flask_debugtoolbar.panels.versions.VersionDebugPanel',
|
||||
'flask_debugtoolbar.panels.headers.HeaderDebugPanel',
|
||||
'flask_debugtoolbar.panels.request_vars.RequestVarsDebugPanel',
|
||||
'flask_debugtoolbar.panels.config_vars.ConfigVarsDebugPanel',
|
||||
'flask_debugtoolbar.panels.template.TemplateDebugPanel',
|
||||
'flask_debugtoolbar.panels.logger.LoggingPanel',
|
||||
'flask_debugtoolbar.panels.route_list.RouteListDebugPanel']
|
||||
|
Reference in New Issue
Block a user