how to prepopulat a form with existing data python code example
Example: how to pre populate field flask wtforms
form.populate_obj(user)
user.site = form.website.data
db.session.commit()
form.populate_obj(user)
user.site = form.website.data
db.session.commit()