From 91017c4336ae4b1c6a90973f5deae935bff53731 Mon Sep 17 00:00:00 2001 From: Llloooggg Date: Mon, 16 Aug 2021 18:31:11 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0?= =?UTF-8?q?=20=D1=81=D0=BE=D0=B2=D0=BF=D0=B0=D0=B4=D0=B5=D0=BD=D0=B8=D1=8F?= =?UTF-8?q?=20=D0=BF=D0=B0=D1=80=D0=BE=D0=BB=D0=B5=D0=B9=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=20=D1=80=D0=B5=D0=B3=D0=B8=D1=81=D1=82=D1=80=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dyxless/auth.py | 8 ++++++++ dyxless/templates/signup.html | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/dyxless/auth.py b/dyxless/auth.py index 12414ea..34e4082 100644 --- a/dyxless/auth.py +++ b/dyxless/auth.py @@ -60,6 +60,14 @@ def signup(): email = request.form.get("email") username = request.form.get("username") password = request.form.get("password") + password_confirmation = request.form.get("password_confirmation") + + if password != password2: + flash( + "Пароли не совпадают", + "is-danger", + ) + return redirect(url_for("auth.signup")) user = User.query.filter_by(email=email).first() diff --git a/dyxless/templates/signup.html b/dyxless/templates/signup.html index a122803..039631c 100644 --- a/dyxless/templates/signup.html +++ b/dyxless/templates/signup.html @@ -34,6 +34,15 @@

+
+ +

+ + + + +

+