1
0
Fork 0
mirror of https://github.com/Thor77/TeamspeakStats.git synced 2025-07-12 18:18:45 -04:00

rename template-filter fmttime to frmttime

This commit is contained in:
Thor77 2016-06-12 17:55:03 +02:00
parent c3dabb9082
commit 32234b4886

View file

@ -49,9 +49,9 @@ def render_template(clients, output, title='TeamspeakStats'):
]) ])
template_env = Environment(loader=template_loader) template_env = Environment(loader=template_loader)
def fmttime(timestamp): def frmttime(timestamp):
return strftime('%x %X', localtime(int(timestamp))) return strftime('%x %X', localtime(int(timestamp)))
template_env.filters['frmttime'] = fmttime template_env.filters['frmttime'] = frmttime
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,