I have a Flask app in which I can populate form data by uploading a CSV file which is then read. I want to populate a FieldList with the data read from the CSV. However, whe
In response to the accepted answer: The append_entry function expects data, not a Form. So if you approach it like this your code also works as you'd expect. With the added benefit of being easier to maintain
# First remap your list of tuples to a list of dicts
students = [dict(zip(["student_id","student_name"], student)) for student in student_info]
for student in students:
# Tell the form to add a new entry with the data we supply
classform.students.append_entry(student)