add credit and render-date/time to template-footer

This commit is contained in:
Thor77 2016-07-04 21:14:29 +02:00
parent 477ca7d739
commit 60bdcb7aab
2 changed files with 4 additions and 1 deletions

View File

@ -32,6 +32,7 @@
</ul>
{% endif %}
{% endfor %}
<small>Generated by <a href="https://github.com/Thor77/TeamspeakStats">TeamspeakStats</a> at {{ creation_time|frmttime }}</small>
</div>
</body>
</html>

View File

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
import logging
from datetime import datetime
from os.path import dirname
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')
with open(output, 'w') as f:
f.write(template.render(title=title, objs=objs,
debug=logger.level <= logging.DEBUG))
debug=logger.level <= logging.DEBUG,
creation_time=datetime.now()))