diff --git a/home.py b/home.py index f1671dc..403b0a1 100644 --- a/home.py +++ b/home.py @@ -1,6 +1,7 @@ -import main import flask -@main.app.route("/", methods = ['GET']) -def home(): +home = flask.Blueprint("home", __name__, template_folder="templates") + +@home.route("/") +def show(): return (flask.render_template("home/index.html")) diff --git a/login.py b/login.py index 68a9a63..bb8e47e 100644 --- a/login.py +++ b/login.py @@ -1,10 +1,12 @@ -import main import flask -@main.app.route("/login", methods = ['POST', 'GET']) -def login(): - if (flask.request.methods == ['GET']): +login = flask.Blueprint("login", __name__, template_folder="templates") + +@login.route("/login", methods=['POST', 'GET']) +def show(): + if (flask.request.method == ['GET']): return (flask.render_template("login/login.html")) else: + return ("bozo") email = flask.request.form['email'] password = flask.request.form['password'] diff --git a/main.py b/main.py index 99286ca..0cec8c5 100644 --- a/main.py +++ b/main.py @@ -1,8 +1,11 @@ import flask import database +import home, login app = flask.Flask(__name__) if (__name__ == "__main__"): + app.register_blueprint(home.home) + app.register_blueprint(login.login) app.run()