summaryrefslogtreecommitdiff
path: root/routes.py
diff options
context:
space:
mode:
authorMarina Jäntti <mjantti@local>2023-11-01 02:45:15 +0200
committerMarina Jäntti <mjantti@local>2023-11-01 02:45:15 +0200
commitd67248c6cab9145ad88d5c16584b58abc7055676 (patch)
treecd655a78837e2908ae42e8b58e904c2603a49e2a /routes.py
parent59a6f10326bc785b84620426c3e5b1405ab6ca39 (diff)
Just initial structure and testing out cookies
Diffstat (limited to 'routes.py')
-rw-r--r--routes.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/routes.py b/routes.py
new file mode 100644
index 0000000..09ba156
--- /dev/null
+++ b/routes.py
@@ -0,0 +1,30 @@
+from app import app
+from flask import render_template,session
+
+@app.route("/")
+def index():
+ return app.send_static_file("index.html")
+
+@app.route("/pages/info.html")
+def info():
+ return render_template("info.html")
+
+@app.route("/pages/create.html")
+def create():
+ if "nick" not in session:
+ return render_template("nick.html")
+ return render_template("create.html")
+
+@app.route("/pages/answer.html")
+def answer():
+ if "nick" not in session:
+ return render_template("nick.html")
+ return render_template("answer.html")
+
+@app.route("/pages/analyse.html")
+def analyse():
+ return render_template("analyse.html")
+
+@app.route("/pages/moderate.html")
+def moderate():
+ return render_template("moderate.html")