wundertile/app/forms.py
2019-04-24 17:51:45 +02:00

18 lines
496 B
Python

"""Forms for the application"""
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField
from wtforms.validators import DataRequired, Length
class RegisterForm(FlaskForm):
"""Register one user"""
name = StringField('Nickname', validators=[DataRequired(), Length(3, 25)])
password = PasswordField('Password', validators=[Length(6)])
class LoginForm(FlaskForm):
"""Login one user"""
name = StringField('Name')
password = PasswordField('Password')