From 3ed9925fd33610833a0ad6aafa68df607b09d932 Mon Sep 17 00:00:00 2001 From: burzuf Date: Sun, 15 Mar 2020 14:42:32 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D1=80=D0=B0=D0=B1?= =?UTF-8?q?=D0=BE=D1=82=D0=B0=D0=BD=D0=B0=20=D0=B8=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D1=82=D0=B5=D1=81=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD?= =?UTF-8?q?=D0=B0=20=D1=80=D0=B5=D0=B3=D0=B8=D1=81=D1=82=D1=80=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __init__.py | 2 -- db_routing.py | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index 70a5a77..2b53970 100644 --- a/__init__.py +++ b/__init__.py @@ -22,8 +22,6 @@ def register(): userLogin = request.form['UserLogin'] userPassw = request.form['UserPassw'] db_routing.add_user(userLogin, passw_hash(userPassw)) - else: - print('Логин занят') return render_template('registration.html') diff --git a/db_routing.py b/db_routing.py index 3465184..0a6a560 100644 --- a/db_routing.py +++ b/db_routing.py @@ -19,6 +19,8 @@ def add_user(user_name, passw_hash): new_user = User(UserName=user_name, UserPassw=passw_hash) db.session.add(new_user) db.session.commit() + else: + print('Логин занят') def find_user(user_name):