aboutsummaryrefslogtreecommitdiff
"""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