Files
notifications-admin/app/main/forms.py
Rebecca Law 48b7a7dc37 108536490: Adding the login manager and csrf token.
Still need to figure out how to override the load_user method, currently it is not working.
2015-12-01 10:00:06 +00:00

15 lines
494 B
Python

from flask_wtf import Form
from wtforms import StringField, PasswordField
from wtforms.validators import DataRequired, Email, Length
class LoginForm(Form):
email_address = StringField('Email address', validators=[
Length(min=5, max=255),
DataRequired(message='Email cannot be empty'),
Email(message='Please enter a valid email address')
])
password = PasswordField('Password', validators=[
DataRequired(message='Please enter your password')
])