blob: 19940560dda76ef15f25bd11626cb330a727f219 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
"""Utilities to handle the UI"""
from flask import render_template as flask_render_template
def make_template_renderer(default):
"""Render template for species."""
def render_template(template, **kwargs):
return flask_render_template(
template,
**{
**kwargs,
"activemenu": default,
"activelink": kwargs.get("activelink", default)
})
return render_template
|