From 59c9fbc106185cf7284d6ea2fd842963789ba17a Mon Sep 17 00:00:00 2001 From: Sunpy Date: Mon, 25 Feb 2019 11:38:36 +0100 Subject: [PATCH] Set variable in template --- routes.py | 2 +- templates/home.html | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/routes.py b/routes.py index 75afeb6..ae7338c 100644 --- a/routes.py +++ b/routes.py @@ -4,4 +4,4 @@ from objects import glob # Global sharing of python objects in a manageable way @glob.app.route("/") @glob.app.route("/home") def home(): - return render_template("home.html", title = "Home") + return render_template("home.html") diff --git a/templates/home.html b/templates/home.html index 4e65473..9d5c54e 100644 --- a/templates/home.html +++ b/templates/home.html @@ -1,4 +1,7 @@ +{% set title = "Home" %} + {% extends "layout/bootstrap.html" %} + {% block content %}

Template usage