aboutsummaryrefslogtreecommitdiff
path: root/uploader/ui.py
diff options
context:
space:
mode:
Diffstat (limited to 'uploader/ui.py')
-rw-r--r--uploader/ui.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/uploader/ui.py b/uploader/ui.py
new file mode 100644
index 0000000..4115b02
--- /dev/null
+++ b/uploader/ui.py
@@ -0,0 +1,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