User attributes are supposed to be keyword arguments
parent
8e5e16c170
commit
cb0c689fe9
1 changed files with 2 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue