Choices validation in WTForms does not update when database does
问题 I understand the SelectField method in WTForms takes can argument choices which has the form... choices=[("value1", "display of value 1"), ("value2", "display of value 2")] I need to populate my choices based on a call to the database. I'm using neo4j as my backend, so I can't use modelforms or the other built-in solutions for populating data in a form. def get_list_of_things(): query = 'start n = node:things("*:*") return ID(n), n.display_name;' t = cypher.execute(cdb, query)[0] for x in t: