rename template-filter fmttime to frmttime
This commit is contained in:
parent
c3dabb9082
commit
32234b4886
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue