You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
607 B
30 lines
607 B
5 years ago
|
from flask import current_app
|
||
|
from flask_debugtoolbar.panels import DebugPanel
|
||
|
|
||
|
_ = lambda x: x
|
||
|
|
||
|
|
||
|
class ConfigVarsDebugPanel(DebugPanel):
|
||
|
"""
|
||
|
A panel to display all variables from Flask configuration
|
||
|
"""
|
||
|
name = 'ConfigVars'
|
||
|
has_content = True
|
||
|
|
||
|
def nav_title(self):
|
||
|
return _('Config')
|
||
|
|
||
|
def title(self):
|
||
|
return _('Config')
|
||
|
|
||
|
def url(self):
|
||
|
return ''
|
||
|
|
||
|
def content(self):
|
||
|
context = self.context.copy()
|
||
|
context.update({
|
||
|
'config': current_app.config,
|
||
|
})
|
||
|
|
||
|
return self.render('panels/config_vars.html', context)
|