108536490: Initial effort to implement log in

Add endpoint for post to /sign-in
Initialise role data
This commit is contained in:
Rebecca Law
2015-11-27 09:47:29 +00:00
parent 4d2b9c7fc2
commit 7f96ef5a25
17 changed files with 183 additions and 56 deletions

14
app/main/forms.py Normal file
View File

@@ -0,0 +1,14 @@
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(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')
])