husstanden/routes.py

17 lines
448 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")
2019-04-25 22:17:26 +02:00
@glob.app.route("/dashboard")
2019-02-12 17:09:43 +01:00
def home():
2019-04-25 22:17:26 +02:00
return render_template("pages/dashboard.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:31:58 +01:00