Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Commit

Permalink
Inserido cofigurações para uso da Flask Took Bar
Browse files Browse the repository at this point in the history
Close #6
  • Loading branch information
Riverfount committed Sep 1, 2018
1 parent 5403bb3 commit 870cfc3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
8 changes: 7 additions & 1 deletion settings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,22 @@ SECRET_KEY = 'empty'
EXTENSIONS = [
"talkshow.ext.db",
"talkshow.ext.cli",
"talkshow.ext.debug",
"talkshow.ext.bootstrap",
"talkshow.ext.admin",
"talkshow.ext.apidocs",
"talkshow.ext.login"
"talkshow.ext.login",
]
BLUEPRINTS = [
"talkshow.blueprints.webui",
"talkshow.blueprints.restapi"
]
DEBUG_TOOLBAR_ENABLED = false

[development]
DEBUG = true
DEBUG_TOOLBAR_ENABLED = true
DEBUG_TB_INTERCEPT_REDIRECTS = false
DEBUG_TB_PROFILER_ENABLED = true
DEBUG_TB_TEMPLATE_EDITOR_ENABLED = true
TEMPLATES_AUTO_RELOAD = true
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
'pytest',
'pytest-cov',
'pytest-flask',
'flask-debugtoolbar',
]
}

Expand Down
11 changes: 11 additions & 0 deletions talkshow/ext/debug.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from flask_debugtoolbar import DebugToolbarExtension


def configure(app):
""" Instancia a Debug Tool Bar para a aplicação Flask
:param app: Aplicação Flask que será instanciada
"""

if app.config.get('DEBUG_TOOLBAR_ENABLED'):
DebugToolbarExtension(app)

0 comments on commit 870cfc3

Please sign in to comment.