nopaque/app/auth/forms.py

24 lines
904 B
Python
Raw Normal View History

from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField, SubmitField
2019-07-08 09:08:24 +00:00
from wtforms.validators import DataRequired, Length, Email, Regexp, EqualTo
from wtforms import ValidationError
from ..models import User
class LoginForm(FlaskForm):
email = StringField('Email', validators=[DataRequired(), Length(1, 64),
Email()])
password = PasswordField('Password', validators=[DataRequired()])
remember_me = BooleanField('Keep me logged in')
submit = SubmitField('Log In')
2019-07-08 09:08:24 +00:00
class RegistrationForm(FlaskForm):
email = StringField('Email', validators=[DataRequired(), Length(1, 64), Email()])
2019-07-08 08:54:29 +00:00
class PasswordResetRequestForm(FlaskForm):
email = StringField('Email', validators=[DataRequired(), Length(1, 64),
Email()])
submit = SubmitField('Reset Password')