From fe109bce1bda177ebdafb3c874c4b0caf91c4e03 Mon Sep 17 00:00:00 2001 From: starnakin Date: Sat, 3 Jun 2023 16:58:57 +0200 Subject: [PATCH] add: login page init --- login.py | 10 ++++++++++ main.py | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 login.py diff --git a/login.py b/login.py new file mode 100644 index 0000000..68a9a63 --- /dev/null +++ b/login.py @@ -0,0 +1,10 @@ +import main +import flask + +@main.app.route("/login", methods = ['POST', 'GET']) +def login(): + if (flask.request.methods == ['GET']): + return (flask.render_template("login/login.html")) + else: + email = flask.request.form['email'] + password = flask.request.form['password'] diff --git a/main.py b/main.py index 9ff9de9..2bb8df2 100644 --- a/main.py +++ b/main.py @@ -6,7 +6,6 @@ app = flask.Flask(__name__) def home(): return "

Hello, World!

" - if (__name__ == "__main__"): app.run()