The code in forms.py needs updated as below due to changes in form validation from WTForms.
Replace:
-- coding: utf-8 --
from wtforms import Form, StringField, validators
class LoginForm(Form):
username = StringField('Username:', validators=[validators.required(), validators.Length(min=1, max=30)])
password = StringField('Password:', validators=[validators.required(), validators.Length(min=1, max=30)])
email = StringField('Email:', validators=[validators.optional(), validators.Length(min=0, max=50)])
With:
-- coding: utf-8 --
from wtforms import Form
from wtforms import (StringField)
from wtforms.validators import InputRequired, Length
class LoginForm(Form):
username = StringField('Username:', validators=[InputRequired(), Length(min=5, max=30)])
password = StringField('Password:', validators=[InputRequired(), Length(min=5, max=30)])
email = StringField('Email:', validators=[Length(min=0, max=30)])