diff --git a/main.py b/main.py index 3c5a423..95e7c46 100644 --- a/main.py +++ b/main.py @@ -3,19 +3,14 @@ import requests from flask import Flask, render_template, request, redirect, url_for, session app = Flask(__name__) -app.secret_key = os.urandom(24) -app.config["SESSION_TYPE"] = "filesystem" -app.config["SESSION_FILE_DIR"] = "./.flask_session/" -app.config["SESSION_PERMANENT"] = False -app.config["SESSION_COOKIE_NAME"] = "login" -app.config["SESSION_COOKIE_HTTPONLY"] = True -app.config["SESSION_COOKIE_SECURE"] = False + @app.route("/", methods=["GET", "POST"]) def index(): - if request.method == "POST": - session["username"] = request.form["username"] - session["password"] = request.form["password"] - return redirect(url_for("home")) - return render_template("index.html") \ No newline at end of file + + return render_template("index.html") + + +if __name__ == "__main__": + app.run(host="0.0.0.0") \ No newline at end of file diff --git a/index.html b/templates/index.html similarity index 66% rename from index.html rename to templates/index.html index 0abcdf4..49e7d80 100644 --- a/index.html +++ b/templates/index.html @@ -1,8 +1,8 @@