nopaque/app/corpora/forms.py

25 lines
556 B
Python
Raw Normal View History

2023-03-10 10:33:11 +01:00
from wtforms import StringField, SubmitField, TextAreaField
2022-09-02 13:07:30 +02:00
from wtforms.validators import InputRequired, Length
from app.forms import NopaqueForm
class CorpusBaseForm(NopaqueForm):
2022-11-29 15:28:10 +01:00
description = TextAreaField(
2022-09-02 13:07:30 +02:00
'Description',
validators=[InputRequired(), Length(max=255)]
)
title = StringField('Title', validators=[InputRequired(), Length(max=32)])
submit = SubmitField()
2022-11-29 15:28:10 +01:00
class CreateCorpusForm(CorpusBaseForm):
pass
2022-11-29 15:28:10 +01:00
class UpdateCorpusForm(CorpusBaseForm):
pass
2022-11-29 15:28:10 +01:00
class ImportCorpusForm(NopaqueForm):
2022-09-02 13:07:30 +02:00
pass