Hello!
For add documents to the db you should use the "save" method in
Database class, sometimes you should commit the database too (if you
server doesn't auto commit).
Looking at your source code I found some mistakes with your data, you
have to send a valid dict object.
Your code should looks like:
def register():
form = SignupForm(request.form)
if request.method == 'POST' and form.validate():
#Creates a valid dictionary object
create_user_dict = {'username' : form.username.data, 'email' :
form.email.data, 'password': form.password.data}
#Save the doc in the db
doc_id, doc_rev = db.save(create_user_dict)
flash('Thanks for registering')
return create_user, redirect(url_for('loggedin.html'))
return render_template('get-started.html', form=form)
Cheers,
Martin