nopaque/app/corpora/forms.py
2023-03-29 09:25:08 +02:00

25 lines
556 B
Python

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