-
Notifications
You must be signed in to change notification settings - Fork 0
/
forms.py
26 lines (20 loc) · 1.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
22
23
24
25
26
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField, PasswordField, IntegerField
from wtforms.validators import DataRequired, URL
class AddCafeForm(FlaskForm):
cafe_name = StringField("Cafe Name", validators=[DataRequired()])
cafe_address = StringField("Cafe Address", validators=[DataRequired()])
hours = StringField("Hours", validators=[DataRequired()])
avg_price = StringField("Avg Coffee Price", validators=[DataRequired()])
address_link = StringField("Caffe Address Link", validators=[DataRequired(), URL()])
image_link = StringField("Caffe Image Link", validators=[DataRequired(), URL()])
submit = SubmitField("Submit Post")
class RegisterForm(FlaskForm):
email = StringField("Email", validators=[DataRequired()])
password = PasswordField("Password", validators=[DataRequired()])
name = StringField("Name", validators=[DataRequired()])
submit = SubmitField()
class LoginForm(FlaskForm):
email = StringField("Email", validators=[DataRequired()])
password = PasswordField("Password", validators=[DataRequired()])
submit = SubmitField()