def register_user(): data = { 'first_name': request.form['first_name'], 'last_name': request.form['last_name'], 'email': request.form['email'], 'password': request.form['password'], 'confirm_password': request.form['confirm_password'] } valid = User.validate_registration(data) if valid: User.create_user(data) flash('Account created successfully! Please login now.') return redirect('/')
def register_user(): data = { 'first_name': request.form['first_name'], 'last_name': request.form['last_name'], 'email': request.form['email'], 'password': request.form['password'], 'confirm_password': request.form['confirm_password'] } valid = User.validate_registeration(data) if valid: User.create_user(data) flash("Account created, you can now log in!") return redirect('/')