From 705904e38039c15edebae8c5f50f0fb5b4018672 Mon Sep 17 00:00:00 2001 From: Daniel Tsvetkov Date: Sat, 1 May 2021 00:47:32 +0200 Subject: [PATCH] add title to blogs --- webapp/app.py | 3 ++- webapp/templates/layout.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/webapp/app.py b/webapp/app.py index 5b4b911..6c3d81b 100644 --- a/webapp/app.py +++ b/webapp/app.py @@ -54,7 +54,8 @@ def blog_post_filename(filename): if not blog_post: flash("Blog post doesn't exist") return redirect(url_for('index')) - return render_template("blog_post/get.html", instance=blog_post) + return render_template("blog_post/get.html", instance=blog_post, + title="PiSquared Blog - {}".format(blog_post.title)) @app.route('/rss.xml') diff --git a/webapp/templates/layout.html b/webapp/templates/layout.html index f623f60..e4c585c 100644 --- a/webapp/templates/layout.html +++ b/webapp/templates/layout.html @@ -4,7 +4,7 @@ - PiSquared Blog + {{ title or "PiSquared Blog" }}