From e5548bf1935e0538760b3df3fe82014bcdff4460 Mon Sep 17 00:00:00 2001 From: chee Date: Tue, 17 Nov 2020 15:47:14 +0000 Subject: [PATCH] set title in routes --- app/routes.py | 3 ++- app/templates/base.html | 5 +---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/routes.py b/app/routes.py index 441403c..bbc79fc 100644 --- a/app/routes.py +++ b/app/routes.py @@ -12,7 +12,7 @@ def render_json(thing): return Response(stringify_json(thing), mimetype="application/json") def render_404(thing=""): - return Response(f"404 {thing} not found", status=404) + return Response(f"404 {thing} not found", status=404) @app.route('/') def index(): @@ -133,6 +133,7 @@ def collection(username, slug): if collection is None: return render_404("collection") return render_template("collection.html", + title=collection.name, copyright_holder=ch, collection=collection) diff --git a/app/templates/base.html b/app/templates/base.html index 7653436..cde0783 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -2,10 +2,7 @@ {% block head %}{% endblock %} -{% if collection %} - {{collection.name}} — public dump -

{{collection.name}}

-{% elif title %} +{% if title %} {{title}} — public dump

{{title}}

{% else %}