from wtforms import StringField, SubmitField, TextAreaField from wtforms.validators import InputRequired, Length from app.forms import NopaqueForm class CorpusBaseForm(NopaqueForm): description = TextAreaField( 'Description', validators=[InputRequired(), Length(max=255)] ) title = StringField('Title', validators=[InputRequired(), Length(max=32)]) submit = SubmitField() class CreateCorpusForm(CorpusBaseForm): pass class UpdateCorpusForm(CorpusBaseForm): pass class ImportCorpusForm(NopaqueForm): pass