From 58eeca16bca0974f5a4efa38f3353a576bc8d225 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 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/{{cookiecutter.project_shortname}}/{{cookiecutter.package_name}}/config.py b/{{cookiecutter.project_shortname}}/{{cookiecutter.package_name}}/config.py index c2ea5f3..8f6fc7c 100644 --- a/{{cookiecutter.project_shortname}}/{{cookiecutter.package_name}}/config.py +++ b/{{cookiecutter.project_shortname}}/{{cookiecutter.package_name}}/config.py @@ -113,6 +113,19 @@ 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