summaryrefslogtreecommitdiff
path: root/routes.py
diff options
context:
space:
mode:
authorMikko Portti <mportti2@local>2023-11-16 00:29:31 +0200
committerMikko Portti <mportti2@local>2023-11-16 00:29:31 +0200
commit93a927b130ba09cea29aba2077848f785ac48844 (patch)
tree05c7ae4b7df861e1efd03637c9f0cb6c45787d4b /routes.py
parent92b368c3486fd20e550a2ec7b8e7717f7e061c96 (diff)
Fixing navigation on site in case of redirect
Diffstat (limited to 'routes.py')
-rw-r--r--routes.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/routes.py b/routes.py
index fde054f..b38cf3c 100644
--- a/routes.py
+++ b/routes.py
@@ -7,8 +7,6 @@ def get_alert():
del session["alert"]
return f"{alert}"
return ""
-
-
@app.route("/")
def index():
@@ -21,21 +19,25 @@ def info():
@app.route("/pages/create.html")
def create():
if "id" not in session:
- return render_template("nick.html", alert=get_alert() )
+ return "redirect = #nick"
return render_template("create.html", alert=get_alert() )
@app.route("/pages/answer.html")
def answer():
if "id" not in session:
- return render_template("nick.html", alert=get_alert() )
+ return "redirect = #nick"
return render_template("answer.html", alert=get_alert() )
@app.route("/pages/analyse.html")
def analyse():
if "id" not in session:
- return render_template("nick.html", alert=get_alert() )
+ return "redirect = #nick"
return render_template("analyse.html", alert=get_alert() )
@app.route("/pages/moderate.html")
def moderate():
return render_template("moderate.html", alert=get_alert() )
+
+@app.route("/pages/nick.html")
+def nick():
+ return render_template("nick.html", alert=get_alert() )