Ive waitet way too long
This commit is contained in:
21
app/main_flask.py_
Normal file
21
app/main_flask.py_
Normal file
@@ -0,0 +1,21 @@
|
||||
import flask
|
||||
|
||||
app = flask.Flask(__name__)
|
||||
app.secret_key = "test"
|
||||
|
||||
|
||||
@app.route("/")
|
||||
def view_index():
|
||||
return flask.render_template("../index.html")
|
||||
|
||||
|
||||
@app.route("/handle_post", methods=["POST"])
|
||||
def handle_post():
|
||||
if request.method == "POST":
|
||||
file = request.args.get("file")
|
||||
print(file)
|
||||
return flask.render_template("../index.html")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run()
|
||||
Reference in New Issue
Block a user