]> git.datanom.net - wpp.git/blame - app/forms.py
Base user framework finished
[wpp.git] / app / forms.py
CommitLineData
047d4d29
MR
1from flask_wtf import FlaskForm
2from wtforms import StringField, PasswordField, BooleanField, SubmitField
3from wtforms.validators import InputRequired, Email, Length
4
5class LoginForm(FlaskForm):
6 username = StringField('Username', validators=[InputRequired()])
7 password = PasswordField('Password', validators=[InputRequired()])
8 remember_me = BooleanField('Remember me', default=False)
9 submit_btn = SubmitField('Sign in')
10
11class RegisterForm(FlaskForm):
12 name = StringField('Name', validators=[InputRequired()])
13 email = StringField('Email', validators=[InputRequired(), Email(message='Invalid email'), Length(max=80)])
14 username = StringField('Username', validators=[InputRequired(), Length(min=3, max=15)])
15 password = PasswordField('Password', validators=[InputRequired(), Length(min=8, max=80)])
16 passwordchk = PasswordField('Repeat password', validators=[InputRequired(), Length(min=8, max=80)])
17 submit_btn = SubmitField('Register')
This page took 0.067148 seconds and 5 git commands to generate.