1
0
Fork 0
forked from s3lph/matemat

Included version number in base template.

This commit is contained in:
s3lph 2018-07-09 22:41:58 +02:00
parent 6db093437b
commit e618f06d11
2 changed files with 4 additions and 2 deletions

View file

@ -1,6 +1,8 @@
from jinja2 import Environment, Template
from matemat import __version__
class PageletResponse:
"""
@ -60,4 +62,4 @@ class TemplateResponse(PageletResponse):
:return: An UTF-8 encoded bytes object containing the template rendering result.
"""
template: Template = jinja_env.get_template(self.name)
return template.render(**self.kwargs).encode('utf-8')
return template.render(**self.kwargs, __version__=__version__).encode('utf-8')

View file

@ -27,7 +27,7 @@
<footer>
{% block footer %}
<ul>
<li> Matemat
<li> Matemat {{__version__}}
<li> &copy; 2018 s3lph
<li> MIT License
<li> <a href="https://gitlab.com/s3lph/matemat">Source &amp; Documentation</a>