From 37a80aa58c46cff9e7f05110c6a8d5a9c8dc315feca5d6cd130f5f4445bf7003 Mon Sep 17 00:00:00 2001 From: n Date: Fri, 7 Feb 2025 12:28:21 -0600 Subject: [PATCH] register frontend --- src/toastbin/app.py | 4 ++++ src/toastbin/templates/login.j2 | 1 + src/toastbin/templates/register.j2 | 30 ++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 src/toastbin/templates/register.j2 diff --git a/src/toastbin/app.py b/src/toastbin/app.py index c90ea88..171f426 100644 --- a/src/toastbin/app.py +++ b/src/toastbin/app.py @@ -18,4 +18,8 @@ def new(): def login(): return render_template('login.j2', instance=instance) +@app.route("/register", methods=['GET', 'POST']) +def register(): + return render_template('register.j2', instance=instance) + app.run(debug=True) diff --git a/src/toastbin/templates/login.j2 b/src/toastbin/templates/login.j2 index 2621811..d4f153e 100644 --- a/src/toastbin/templates/login.j2 +++ b/src/toastbin/templates/login.j2 @@ -23,4 +23,5 @@
+ register instead diff --git a/src/toastbin/templates/register.j2 b/src/toastbin/templates/register.j2 new file mode 100644 index 0000000..d7b9a5c --- /dev/null +++ b/src/toastbin/templates/register.j2 @@ -0,0 +1,30 @@ + + + +toastbin - {{ instance }} + + + +
+ home | new paste | explore +
+
+
+
+

+ register at {{ instance }}. make sure to follow the rules. +

+
+ + +
+ + +
+ + +
+ +
+ login instead +