Set variable in template

This commit is contained in:
Emily 2019-02-25 11:38:36 +01:00
parent d4e787a547
commit 59c9fbc106
2 changed files with 4 additions and 1 deletions

View File

@ -4,4 +4,4 @@ from objects import glob # Global sharing of python objects in a manageable way
@glob.app.route("/") @glob.app.route("/")
@glob.app.route("/home") @glob.app.route("/home")
def home(): def home():
return render_template("home.html", title = "Home") return render_template("home.html")

View File

@ -1,4 +1,7 @@
{% set title = "Home" %}
{% extends "layout/bootstrap.html" %} {% extends "layout/bootstrap.html" %}
{% block content %} {% block content %}
<p>Template usage</p> <p>Template usage</p>
<i class="fas fa-user"></i> <!-- uses solid style --> <i class="fas fa-user"></i> <!-- uses solid style -->