User attributes are supposed to be keyword arguments

Dan Cole 2013-06-29 12:03:32 -07:00
parent 8e5e16c170
commit cb0c689fe9

@ -286,8 +286,8 @@ This decorator is checking that g.user has a value assigned to it, otherwise it
form = RegisterForm(request.form)
if form.validate_on_submit():
# create an user instance not yet stored in the database
user = User(form.name.data, form.email.data, \
generate_password_hash(form.password.data))
user = User(name=form.name.data, email=form.email.data, \
password=generate_password_hash(form.password.data))
# Insert the record in our database and commit it
db.session.add(user)
db.session.commit()