make app_version available in templates
This commit is contained in:
parent
690ad71328
commit
da64073ada
2 changed files with 2 additions and 3 deletions
|
|
@ -63,6 +63,7 @@ PRIVATE_ASSETS = os.getenv('PRIVATE_ASSETS', '').split()
|
|||
def _inject_variables():
|
||||
return {
|
||||
'app_name': os.getenv('APP_NAME'),
|
||||
'app_version': __version__,
|
||||
'domain_name': os.getenv('DOMAIN_NAME'),
|
||||
'url_for_css': (lambda name, **kwargs: url_for('static', filename=f'css/{name}.css', **kwargs)),
|
||||
'private_scripts': [x for x in PRIVATE_ASSETS if x.endswith('.js')],
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
import sys
|
||||
from flask import Blueprint, render_template, __version__ as flask_version
|
||||
from sqlalchemy import __version__ as sa_version
|
||||
from .. import __version__ as app_version
|
||||
|
||||
bp = Blueprint('about', __name__)
|
||||
|
||||
|
|
@ -11,8 +10,7 @@ def about():
|
|||
return render_template('about.html',
|
||||
flask_version=flask_version,
|
||||
sa_version=sa_version,
|
||||
python_version=sys.version.split()[0],
|
||||
app_version=app_version
|
||||
python_version=sys.version.split()[0]
|
||||
)
|
||||
|
||||
@bp.route('/terms/')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue