diff --git a/app.py b/app.py index 759a59a..1c090aa 100644 --- a/app.py +++ b/app.py @@ -37,6 +37,7 @@ def widg_fun(widg): return widg.w_type; def req(): + app.route('/req') class Widg: def __init__(self, w_name, w_type, w_opt): self.w_name = w_name @@ -55,13 +56,23 @@ def req(): return render_template("req.html", req_tab = rt, widg_fun = widg_fun, page_name="req") def signup(): + app.route('/req/signup') + username = request.form["username"] email = request.form["email"] shell = request.form["shell"] rule_read = request.form["rule_read"] + is_email_user = False; + if(rule_read != "on"): - print("some fail condition") + return redirect(url_for('req')) + + if(len(email) > 1): + is_email_user = True + + print(username + " " + email + " " + shell + " " + rule_read) + return render_template("signup.html", is_email_user = is_email_user) def login(): @@ -77,5 +88,5 @@ if __name__=="__main__": app.add_url_rule('/success/', 'success', success) app.add_url_rule('/login', 'login', login, methods = ['POST', 'GET']) app.add_url_rule('/req', 'req', req, methods = ['POST', 'GET']) - app.add_url_rule('/req/signup', 'req', req, methods = ['POST']) + app.add_url_rule('/req/signup', 'signup', signup, methods = ['POST']) app.run(host="104.248.118.130",debug=True) diff --git a/templates/main_layout.html b/templates/main_layout.html index f3dc825..a610db0 100644 --- a/templates/main_layout.html +++ b/templates/main_layout.html @@ -11,5 +11,8 @@ +{% if page_name == "home" %} +
+{% endif %} diff --git a/templates/signup.html b/templates/signup.html new file mode 100644 index 0000000..e0a280e --- /dev/null +++ b/templates/signup.html @@ -0,0 +1,21 @@ +{%extends "layout.html"%} + +{%block content%} +

submission successful

+

+ once your request is approved your account will be created + {% if is_email_user %} + and you will receive a confirmation email +

+ {% else %} +you did not provide an emailn +to see if your account is ready, check the users list on the home page +this page will be updated with your username once approved +

+ {% endif %} +

+ if you have questions, email gashapwn@protonmail.com + or DM gashapwn on IRC at irc.lainchan.org +

+ +{%endblock%}