husstanden/routes.py

31 lines
774 B
Python
Raw Normal View History

2019-03-02 23:41:16 +01:00
from flask import render_template, url_for, request
2019-02-12 16:59:43 +01:00
from objects import glob # Global sharing of python objects in a manageable way
2019-02-12 17:09:43 +01:00
@glob.app.route("/")
@glob.app.route("/home")
def home():
2019-02-25 11:38:36 +01:00
return render_template("home.html")
2019-02-25 16:29:35 +01:00
2019-03-02 23:41:16 +01:00
@glob.app.route("/login", methods = ["GET", "POST"])
def serve_login():
if request.method == "POST":
return "TODO: Login handle", 501
return render_template("login.html")
2019-02-25 16:43:57 +01:00
@glob.app.route("/testing")
def we_are_testing():
2019-02-25 16:46:17 +01:00
return render_template("testing.html")
@glob.app.route("/bill")
def serve_bill():
return render_template("bill.html")
2019-02-25 16:46:17 +01:00
2019-02-25 16:29:35 +01:00
@glob.app.route("/regninger")
def serve_regninger():
return render_template("regninger.html")
2019-02-25 16:31:58 +01:00
2019-02-25 16:26:49 +01:00
@glob.app.route("/kvittering")
def serve_kvittering():
return render_template("kvittering.html")
2019-02-25 16:31:58 +01:00