Register and Edit profile in a Flask App
Contents
Create sign up form
In your 'forms.py' file we need to create a form for the sign-up process. You should have created 'forms.py' when you created your login form. So add the following:
class SignUpForm(FlaskForm):
username = StringField('Username', validators=[DataRequired()])
password = PasswordField('Password', validators=[DataRequired()])
confirm = PasswordField('Confirm Password', validators=[DataRequired()])
email = StringField('Email', validators=[])
DOB = DateField('DOB', format='%Y-%m-%d')
MF = SelectField(u'Gender', choices=['M', 'F'])
submit = SubmitField('Sign In')