-
Notifications
You must be signed in to change notification settings - Fork 0
/
forms.py
25 lines (21 loc) · 1.09 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
from flask_wtf import FlaskForm
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField, PasswordField, IntegerField, SelectField, FloatField
from wtforms.validators import DataRequired, URL
class CreatePlaceForm(FlaskForm):
name = StringField("Name", validators=[DataRequired()])
type = StringField("Type (library, books (shop), cafe, etc.)", validators=[DataRequired()])
website = StringField("URL")
lat = FloatField("Map Coordinates (latitude)")
lon = FloatField("Map Coordinates (longitude)")
vibe = StringField("Vibe - What's it like? Who's there? What's everyone doing?")
submit = SubmitField("Submit Post")
class Registration(FlaskForm):
name = StringField("Name", validators=[DataRequired()])
email = StringField("Email", validators=[DataRequired()])
password =PasswordField("Password", validators=[DataRequired()])
submit = SubmitField("Register")
class Login(FlaskForm):
email = StringField("Email", validators=[DataRequired()])
password = PasswordField("Password", validators=[DataRequired()])
submit = SubmitField("Login")