-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathforms.py
20 lines (18 loc) · 865 Bytes
/
forms.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, SubmitField
from flask_wtf.recaptcha import RecaptchaField
from wtforms.validators import DataRequired
class RegisterForm(FlaskForm):
username = StringField('Username',
validators=[DataRequired()])
password = PasswordField('Password',
validators=[DataRequired()])
recaptcha = RecaptchaField()
submit = SubmitField('Submit')
class ChangePasswordForm(FlaskForm):
oldpassword = PasswordField('Current Password',
validators=[DataRequired()])
newpassword = PasswordField('New Password',
validators=[DataRequired()])
newpasswordretype = PasswordField('Retype New Password',
validators=[DataRequired()])