diff options
Diffstat (limited to 'uploader/species')
-rw-r--r-- | uploader/species/views.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/uploader/species/views.py b/uploader/species/views.py index 6009f03..6f4d51f 100644 --- a/uploader/species/views.py +++ b/uploader/species/views.py @@ -4,9 +4,9 @@ from flask import (flash, url_for, redirect, Blueprint, - current_app as app, - render_template as flask_render_template) + current_app as app) +from uploader.ui import make_template_renderer from uploader.authorisation import require_login from uploader.db_utils import database_connection @@ -14,16 +14,7 @@ from .models import all_species, save_species, species_by_id speciesbp = Blueprint("species", __name__) - - -def render_template(template, **kwargs): - """Render template for species.""" - return flask_render_template( - template, - **{ - **kwargs, - "activelink": kwargs.get("activelink", "species") - }) +render_template = make_template_renderer("species") @speciesbp.route("/", methods=["GET"]) |