from flask_wtf import FlaskForm from wtforms import SelectField, StringField, SubmitField from wtforms.validators import Length class SelectConsumableForm(FlaskForm): consumable = SelectField('Consumable', coerce=int) submit = SubmitField(label='Do it!') class CreateConsumableForm(FlaskForm): name = StringField('Name', validators=[Length(1, 255)]) unit = StringField('Unit', validators=[Length(1, 255)]) submit = SubmitField(label='Do it!') class EditConsumableForm(FlaskForm): name = StringField('Name', validators=[Length(1, 255)]) unit = StringField('Unit', validators=[Length(1, 255)]) submit = SubmitField(label='Do it!') class DeletConsumableForm(FlaskForm): submit = SubmitField(label='Do it!')