rollerverbrauch/app/forms/consumable.py

24 lines
722 B
Python
Raw Normal View History

2016-11-01 16:36:28 +01:00
from flask_wtf import Form
from wtforms import SelectField, StringField, SubmitField
from wtforms.validators import Length
class SelectConsumableForm(Form):
consumable = SelectField('Consumable', coerce=int)
submit = SubmitField(label='Do it!')
class CreateConsumableForm(Form):
name = StringField('Name', validators=[Length(1, 255)])
unit = StringField('Unit', validators=[Length(1, 255)])
submit = SubmitField(label='Do it!')
class EditConsumableForm(Form):
name = StringField('Name', validators=[Length(1, 255)])
unit = StringField('Unit', validators=[Length(1, 255)])
submit = SubmitField(label='Do it!')
class DeletConsumableForm(Form):
submit = SubmitField(label='Do it!')