aboutsummaryrefslogtreecommitdiff
path: root/uploader/ui.py
blob: 4115b021e4d63c87eda185c546822252877fa60b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
"""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,
                "activelink": kwargs.get("activelink", default)
            })
    return render_template