From d67248c6cab9145ad88d5c16584b58abc7055676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marina=20J=C3=A4ntti?= Date: Wed, 1 Nov 2023 02:45:15 +0200 Subject: Just initial structure and testing out cookies --- nick.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 nick.py (limited to 'nick.py') diff --git a/nick.py b/nick.py new file mode 100644 index 0000000..e5f7186 --- /dev/null +++ b/nick.py @@ -0,0 +1,10 @@ +from app import app +from flask import render_template, session, request, redirect + +@app.route("/nick",methods=["POST"]) +def set_nick(): + nick = request.form["nick"] + session["nick"] = nick + return redirect("/") + + -- cgit v1.2.3