How to collect WTForms data through loop without explicitly stating the name of each field?

Solution
if form.validate_on_submit():
    form.populate_obj(post)
    db.session.commit()
    return redirect(url_for('post', post_id=post.id))