add credit and render-date/time to template-footer
This commit is contained in:
parent
477ca7d739
commit
60bdcb7aab
|
@ -32,6 +32,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
<small>Generated by <a href="https://github.com/Thor77/TeamspeakStats">TeamspeakStats</a> at {{ creation_time|frmttime }}</small>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
from datetime import datetime
|
||||||
from os.path import dirname
|
from os.path import dirname
|
||||||
|
|
||||||
from jinja2 import ChoiceLoader, Environment, FileSystemLoader, PackageLoader
|
from jinja2 import ChoiceLoader, Environment, FileSystemLoader, PackageLoader
|
||||||
|
@ -56,4 +57,5 @@ def render_template(clients, output, title='TeamspeakStats'):
|
||||||
template = template_env.get_template('template.html')
|
template = template_env.get_template('template.html')
|
||||||
with open(output, 'w') as f:
|
with open(output, 'w') as f:
|
||||||
f.write(template.render(title=title, objs=objs,
|
f.write(template.render(title=title, objs=objs,
|
||||||
debug=logger.level <= logging.DEBUG))
|
debug=logger.level <= logging.DEBUG,
|
||||||
|
creation_time=datetime.now()))
|
||||||
|
|
Loading…
Reference in New Issue