From 64790126035e2ee1a10693aad9bd4045fd575727 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 3 Sep 2024 11:30:07 -0500 Subject: Enable third level of breadcrumbs. --- uploader/species/views.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'uploader/species') diff --git a/uploader/species/views.py b/uploader/species/views.py index 4372504..f2d7545 100644 --- a/uploader/species/views.py +++ b/uploader/species/views.py @@ -18,7 +18,12 @@ speciesbp = Blueprint("species", __name__) def render_template(template, **kwargs): """Render template for species.""" - return flask_render_template(template, **kwargs, activelink="species") + return flask_render_template( + template, + **{ + **kwargs, + "activelink": kwargs.get("activelink", "species") + }) @speciesbp.route("/", methods=["GET"]) @@ -43,7 +48,8 @@ def create_species(): # https://rest.uniprot.org/taxonomy/ e.g. # https://rest.uniprot.org/taxonomy/6239 if request.method == "GET": - return render_template("species/create-species.html") + return render_template("species/create-species.html", + activelink="create-species") with (database_connection(app.config["SQL_URI"]) as conn, conn.cursor() as cursor): -- cgit v1.2.3