From 970ebfdd16b395b7f97fd45903a14cd0a62612c1 Mon Sep 17 00:00:00 2001 From: Rokas Maciulaitis Date: Wed, 13 Nov 2019 11:58:51 +0100 Subject: [PATCH] config: disables sqlalchemy pane of flask-debugtoolbar for mysql * sqlalchemy pane cannot handle UUID in bytes format https://github.com/mgood/flask-debugtoolbar/issues/112 Closes #184 --- .../{{cookiecutter.package_name}}/config.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/{{cookiecutter.project_shortname}}/{{cookiecutter.package_name}}/config.py b/{{cookiecutter.project_shortname}}/{{cookiecutter.package_name}}/config.py index c2ea5f3..19cc12d 100644 --- a/{{cookiecutter.project_shortname}}/{{cookiecutter.package_name}}/config.py +++ b/{{cookiecutter.project_shortname}}/{{cookiecutter.package_name}}/config.py @@ -113,6 +113,20 @@ def _(x): {%- elif cookiecutter.database == 'mysql'%} SQLALCHEMY_DATABASE_URI = \ 'mysql+pymysql://{{cookiecutter.project_shortname}}:{{cookiecutter.project_shortname}}@localhost/{{cookiecutter.project_shortname}}' + +# Disable Flask-DebugToolbar SQLAlchemy pane +# https://github.com/mgood/flask-debugtoolbar/issues/112 +DEBUG_TB_PANELS = ( + 'flask_debugtoolbar.panels.versions.VersionDebugPanel', + 'flask_debugtoolbar.panels.timer.TimerDebugPanel', + '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.sqlalchemy.SQLAlchemyDebugPanel', + 'flask_debugtoolbar.panels.logger.LoggingPanel', + 'flask_debugtoolbar.panels.route_list.RouteListDebugPanel', + 'flask_debugtoolbar.panels.profiler.ProfilerDebugPanel') {%- endif %} # JSONSchemas