You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
496 B
Python

6 years ago
"""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')