diff --git a/routes.py b/routes.py index 976e3ef..75afeb6 100644 --- a/routes.py +++ b/routes.py @@ -1,3 +1,7 @@ from flask import render_template, url_for 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") diff --git a/templates/home.html b/templates/home.html new file mode 100644 index 0000000..f7e1afe --- /dev/null +++ b/templates/home.html @@ -0,0 +1,4 @@ +{% extends "layout/main.html" %} +{% block content %} +

Template usage

+{% endblock %} \ No newline at end of file diff --git a/templates/layout/main.html b/templates/layout/main.html new file mode 100644 index 0000000..169a5cb --- /dev/null +++ b/templates/layout/main.html @@ -0,0 +1,14 @@ + + + + +{% if title %} + Husstanden - {{ title }} +{% else %} + Husstanden +{% endif %} + + +{% block content %}{% endblock %} + + \ No newline at end of file