From f95eb00a45bfcde4f58c4d4944a79737770a906c Mon Sep 17 00:00:00 2001 From: Sunpy Date: Thu, 25 Apr 2019 21:17:26 +0100 Subject: [PATCH] Page title --- routes.py | 18 ++---------------- templates/home.html | 10 ---------- templates/layout/includes/top_nav.html | 2 +- templates/{ => pages}/bill.html | 0 templates/pages/dashboard.html | 9 +++++++++ templates/{ => pages}/kvittering.html | 0 templates/{ => pages}/regninger.html | 0 templates/{ => pages}/testing.html | 0 8 files changed, 12 insertions(+), 27 deletions(-) delete mode 100644 templates/home.html rename templates/{ => pages}/bill.html (100%) create mode 100644 templates/pages/dashboard.html rename templates/{ => pages}/kvittering.html (100%) rename templates/{ => pages}/regninger.html (100%) rename templates/{ => pages}/testing.html (100%) diff --git a/routes.py b/routes.py index 4392b5b..269a169 100644 --- a/routes.py +++ b/routes.py @@ -3,8 +3,9 @@ from objects import glob # Global sharing of python objects in a manageable way @glob.app.route("/") @glob.app.route("/home") +@glob.app.route("/dashboard") def home(): - return render_template("home.html") + return render_template("pages/dashboard.html") @glob.app.route("/login", methods = ["GET", "POST"]) def serve_login(): @@ -12,19 +13,4 @@ def serve_login(): return "TODO: Login handle", 501 return render_template("login.html") -@glob.app.route("/testing") -def we_are_testing(): - return render_template("testing.html") - -@glob.app.route("/bill") -def serve_bill(): - return render_template("bill.html") - -@glob.app.route("/regninger") -def serve_regninger(): - return render_template("regninger.html") - -@glob.app.route("/kvittering") -def serve_kvittering(): - return render_template("kvittering.html") diff --git a/templates/home.html b/templates/home.html deleted file mode 100644 index 55932a7..0000000 --- a/templates/home.html +++ /dev/null @@ -1,10 +0,0 @@ -{% set title = "Home" %} - -{% extends "layout/dash.html" %} - -{% block content %} -

Template usage

- - - -{% endblock %} \ No newline at end of file diff --git a/templates/layout/includes/top_nav.html b/templates/layout/includes/top_nav.html index 7e6944e..811b549 100644 --- a/templates/layout/includes/top_nav.html +++ b/templates/layout/includes/top_nav.html @@ -32,7 +32,7 @@