diff options
author | Linnnus <[email protected]> | 2024-04-27 21:21:51 +0200 |
---|---|---|
committer | Linnnus <[email protected]> | 2024-04-27 21:21:51 +0200 |
commit | c0d2b9eb7e2b65b582039aafdca765fe32acf81e (patch) | |
tree | 9aa75621f78fb74c67907856a76d65a299ea66bf /app.py | |
parent | 2bc4e69a4b08dbbd60b1ed711d6cfe825adb0209 (diff) |
Flesh out 'join' user flow
This commit splits the user flow when sending in an application to join
the guild into three staged:
1. Intro text
2. HTML form
3. Form submission feedback (aka. "yay it went through")
Diffstat (limited to 'app.py')
-rw-r--r-- | app.py | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -43,11 +43,15 @@ def callback(): return f'Access token: {token_response.get("access_token")}' [email protected]("/join.html") [email protected]("/join_intro.html") +def join_intro(): + return template("join_intro") + [email protected]("/join_form.html") def join_form(): - return template("join") + return template("join_form") [email protected]("/join.html", method="POST") [email protected]("/join_form.html", method="POST") def join_submission(db): name = request.forms.get("name") preferred_role = request.forms.get("preferredRole") @@ -64,6 +68,8 @@ def join_submission(db): db.execute(f"INSERT INTO applications(name, role, motivation) VALUES ({name}, {preferred_role}, {motivation})") + return template("join_success") + @app.route("/<type:re:styles|images>/<filename>") def server_static(type, filename): return static_file(filename, root=f"./static/{type}/") |