-
Notifications
You must be signed in to change notification settings - Fork 0
/
forms.py
58 lines (53 loc) · 1.89 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
from flask_wtf import FlaskForm
from wtforms.validators import DataRequired, EqualTo, Email
from wtforms import SelectMultipleField, StringField, PasswordField, SubmitField
class RegistrationForm(FlaskForm):
diets = [ # TODO: make screen readers not read the emojis
"🥦 Vegetarian",
"🌱 Vegan",
"🥑 Keto Friendly",
"🔯 Kosher",
"🐟 Pescatarian",
"🦖 Paleo",
"🍬 Low Sugar",
"🥔 Low Potassium",
"🥗 Low Fat Abs",
"👶 Kidney Friendly",
"🍭 Sugar Conscious",
"🌡️ Immuno Supportive",
]
dietary_restrictions = [
"🍷 Alcohol-Free",
"🥬 Celery-Free",
"🦞 Crustacean-Free",
"🥛 Dairy-Free",
"🥚 Egg-Free",
"🐟 Fish-Free",
"🥗 Fodmap-Free",
"🌾 Gluten-Free",
"🌱 Lupine-Free",
"🐚 Mollusk-Free",
"🌿 Mustard-Free",
"🛢️ No Oil Added",
"🥜 Peanut-Free",
"🐖 Pork-Free",
"🥩 Red Meat Free",
"🌰 Sesame-Free",
"🦐 Shellfish-Free",
"🌿 Soy-Free",
"🧪 Sulfite-Free",
"🌰 Tree Nut Free",
"🌾 Wheat-Free",
]
# username = StringField('Username', validators=[DataRequired()])
# password = PasswordField('Password',validators=[DataRequired()])
# password2 = PasswordField('Repeat Password', validators=[DataRequired(), EqualTo('password')])
diet_checkboxes = SelectMultipleField("Special Diets", choices=diets)
restriction_checkboxes = SelectMultipleField(
"Excluded Ingredients", choices=dietary_restrictions
)
submit = SubmitField("Generate meal plan →")
class SignInForm(FlaskForm):
username = StringField("Username", validators=[DataRequired()])
password = PasswordField("Password", validators=[DataRequired()])
submit = SubmitField("Sign In")