if len(email) < 4:
flash('Email must be greater than 3 characters.', category="error")
pass
elif len(user_name) < 2:
flash('User name must be greater than 1 characters.', category="error")
pass
elif password1 != password2:
flash('Passwords dont match.', category = 'error')
pass
elif len(password1) < 7:
flash('Password length must be at least 7 characters', category='error')
pass
else :
new_user= User(email=email, user_name=user_name, password=generate_password_hash(password1, method='pbkdf2:sha256'))
db.session.add(new_user)
db.session.commit()
flash('Account created!' , category='success')
return redirect(url_for(bands.home))
#add user to database
return render_template('sign_up.html')
[SQL: INSERT INTO user (email, user_name, password) VALUES (?, ?, ?)]
[parameters: ('hgvgvgh@hmail.com', 'Tacoisgreat33', 'pbkdf2:sha256:600000$YVJQPFLtMpFqvJsJ$14812ee05735f8457d823a587364c1bacf05d8f31fa77a79774b1630182aab42')] the error ^^^^
auth = Blueprint('auth', name)
@auth.route('/login' , methods=['GET' , 'POST' ]) def login(): return render_template("login.html", )
@auth.route('/logout') def logout(): return '
Logout
'@auth.route('/sign-up' , methods =['GET', 'POST' ]) def sign_up(): if request.method == 'POST': email = request.form.get('email') user_name = request.form.get('userName') password1 = request.form.get('password1') password2 = request.form.get('password2')