mirror of
https://github.com/Llloooggg/Jarvis.git
synced 2026-03-06 03:56:23 +03:00
Переработана и протестирована регистрация
This commit is contained in:
@@ -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')
|
||||
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user