diff --git a/src/toastbin/app.py b/src/toastbin/app.py index a94e59e..ab83c9a 100644 --- a/src/toastbin/app.py +++ b/src/toastbin/app.py @@ -1,4 +1,4 @@ -from flask import Flask, render_template +from flask import Flask, render_template, request import json import database @@ -21,6 +21,11 @@ def login(): @app.route("/register", methods=['GET', 'POST']) def register(): - return render_template('register.j2', instance=instance) + if request.method == "GET": + return render_template('register.j2', instance=instance) + if request.method == "POST": + data = request.form + print(str(data)) + return render_template('register.j2', instance=instance) app.run(debug=True, host="0.0.0.0")