1 2 3 4 5 6 7 8 9
| from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField from wtforms.validators import length, email, DataRequired
class LoginForm(FlaskForm): username = StringField('Username', validators=[DataRequired()]) password = PasswordField('Password', validators=[DataRequired(), length(min=6, max=20)]) remember = BooleanField('Remember me') submit = SubmitField('Log in')
|