From 249f5d94d61f7fc47992a5647da9ffc38eb55c8e Mon Sep 17 00:00:00 2001 From: kaiyou Date: Sun, 29 Oct 2017 13:43:10 +0100 Subject: [PATCH] Add a debugging bar for development --- admin/mailu/__init__.py | 5 +++++ admin/requirements-prod.txt | 17 +++++++++-------- admin/requirements.txt | 1 + 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/admin/mailu/__init__.py b/admin/mailu/__init__.py index 6d69621e..66641ffc 100644 --- a/admin/mailu/__init__.py +++ b/admin/mailu/__init__.py @@ -43,6 +43,11 @@ flask_bootstrap.Bootstrap(app) db = flask_sqlalchemy.SQLAlchemy(app) migrate = flask_migrate.Migrate(app, db) +# Debugging toolbar +if app.config.get("DEBUG"): + import flask_debugtoolbar + toolbar = flask_debugtoolbar.DebugToolbarExtension(app) + # Manager commnad manager = flask_script.Manager(app) manager.add_command('db', flask_migrate.MigrateCommand) diff --git a/admin/requirements-prod.txt b/admin/requirements-prod.txt index d5ec8472..60154a90 100644 --- a/admin/requirements-prod.txt +++ b/admin/requirements-prod.txt @@ -1,11 +1,12 @@ -alembic==0.9.5 -asn1crypto==0.22.0 +alembic==0.9.6 +asn1crypto==0.23.0 Babel==2.5.1 +blinker==1.4 certifi==2017.7.27.1 -cffi==1.11.0 +cffi==1.11.2 chardet==3.0.4 click==6.7 -cryptography==2.0.3 +cryptography==2.1.2 decorator==4.1.2 docker-py==1.10.6 docker-pycreds==0.2.1 @@ -13,10 +14,11 @@ dominate==2.3.1 Flask==0.12.2 Flask-Babel==0.11.2 Flask-Bootstrap==3.3.7.1 +Flask-DebugToolbar==0.10.1 Flask-Login==0.4.0 Flask-Migrate==2.1.1 Flask-Script==2.0.6 -Flask-SQLAlchemy==2.2 +Flask-SQLAlchemy==2.3.2 Flask-WTF==0.14.2 gunicorn==19.7.1 idna==2.6 @@ -34,10 +36,9 @@ python-editor==1.0.3 pytz==2017.2 PyYAML==3.12 requests==2.18.4 -six==1.10.0 +six==1.11.0 SQLAlchemy==1.1.14 -tabulate==0.7.7 -tzlocal==1.4 +tabulate==0.8.1 urllib3==1.22 validators==0.12.0 visitor==0.1.3 diff --git a/admin/requirements.txt b/admin/requirements.txt index 47d3147b..b2c3849e 100644 --- a/admin/requirements.txt +++ b/admin/requirements.txt @@ -6,6 +6,7 @@ Flask-Babel Flask-migrate Flask-script Flask-wtf +Flask-debugtoolbar WTForms-Components passlib gunicorn