Moving version to a single place in version.py (#358)
* Moving version to a single place in version.py * Requirements in setup.py + tox.ini
This commit is contained in:
@@ -29,6 +29,8 @@ from puppetboard.dailychart import get_daily_reports_chart
|
||||
|
||||
import werkzeug.exceptions as ex
|
||||
|
||||
from . import __version__
|
||||
|
||||
REPORTS_COLUMNS = [
|
||||
{'attr': 'end', 'filter': 'end_time',
|
||||
'name': 'End time', 'type': 'datetime'},
|
||||
@@ -66,6 +68,11 @@ logging.basicConfig(level=numeric_level)
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@app.template_global()
|
||||
def version():
|
||||
return __version__
|
||||
|
||||
|
||||
def stream_template(template_name, **context):
|
||||
app.update_template_context(context)
|
||||
t = app.jinja_env.get_template(template_name)
|
||||
|
||||
Reference in New Issue
Block a user