forms_7.py 980 Bytes
Newer Older
danmcquillan's avatar
lab-15    
danmcquillan committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from flask_wtf import FlaskForm
from wtforms import StringField
from wtforms import HiddenField
from wtforms import PasswordField
from wtforms import SubmitField
from wtforms import validators

class addTwitForm(FlaskForm):
    twit = StringField('twit', validators = [validators.DataRequired()])
    submit = SubmitField('submit', [validators.DataRequired()])

class editTwitForm(FlaskForm):
    twit = StringField('twit', validators = [validators.DataRequired()])
    twit_id = HiddenField('twit_id')
    submit = SubmitField('submit', [validators.DataRequired()])

class loginForm(FlaskForm):
    username = StringField('username', validators = [validators.DataRequired()])
    password = PasswordField('password', validators =[validators.DataRequired()])
    password2 = PasswordField('password2', validators=[validators.DataRequired(),
        validators.EqualTo('password', message='Passwords must match')])
    submit = SubmitField('submit', [validators.DataRequired()])