Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @app.route("/register", methods=["GET","POST"])
- def register():
- if request.form["username"] == "" or request.form["password"] == "":
- return render_template("apology.html")
- if request.form["password"] == request.form["again_password"]:
- db.execute("INSERT INTO finance (username, password) VALUES(:username, :password)", username=request.form["username"], password=request.form["password"])
- print ("Both passwords don't match")
- return redirect(url_for("register.html", next=request.url))
Add Comment
Please, Sign In to add comment