def login(): if logged_in(): return flask.redirect("/") if has_fields(flask.request.form, ["Username", "Password", "Method"]): if flask.request.form["Method"] == "Login": return verify_login_user(flask.request.form) elif flask.request.form["Method"] == "Register": return register_user(flask.request.form) return flask.render_template("user/login.html")
def frontpage(): return flask.render_template("homepage/index.html", logged_in = logged_in())