-
Notifications
You must be signed in to change notification settings - Fork 0
/
forms.py
21 lines (17 loc) · 1 KB
/
forms.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, SubmitField, BooleanField
from wtforms.validators import DataRequired, EqualTo, Email
from werkzeug.security import generate_password_hash, check_password_hash
class RegistrationForm(FlaskForm):
username = StringField('username', validators=[DataRequired()])
password1 = PasswordField('Password', validators=[DataRequired()])
password2 = PasswordField('Confirm Password', validators=[DataRequired(), EqualTo('password1')])
apik = StringField('API Key', validators=[DataRequired()])
apis = StringField('API Secret', validators=[DataRequired()])
apip = StringField('API passphrase', validators=[DataRequired()])
submit = SubmitField('Register')
class LoginForm(FlaskForm):
username = StringField('username', validators=[DataRequired()])
password = PasswordField('Password', validators=[DataRequired()])
remember = BooleanField('Remember Me', validators=[DataRequired()])
submit = SubmitField('Login')