mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-25 02:44:18 +00:00
13 lines
546 B
Python
13 lines
546 B
Python
from flask_wtf import FlaskForm
|
|
from flask_wtf.file import FileAllowed, FileField, FileRequired
|
|
from wtforms import StringField, SubmitField
|
|
from wtforms.validators import DataRequired, Length
|
|
|
|
|
|
class TestForm(FlaskForm):
|
|
description = StringField('Description',
|
|
validators=[DataRequired(), Length(1, 255)])
|
|
file = FileField('File', validators=[FileAllowed(['txt'], 'Plain text only!'), FileRequired()])
|
|
submit = SubmitField()
|
|
title = StringField('Title', validators=[DataRequired(), Length(1, 32)])
|