Make WTForms set field label from database model
问题 I have three tables: components , attributes and attribute_values . Each component can have many attribute_values . Each attribute_value belongs to one attribute . Yeah, it's the dreaded EAV pattern... I have created these two forms: class AttributeValueForm(Form): attribute = HiddenField() value = StringField('Value') class ComponentForm(Form): ... non-related fields left out ... attribute_values = FieldList(FormField(AttributeValueForm)) These are the SQLAlchemy models: class Component(db