-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform.py
30 lines (22 loc) · 1.47 KB
/
form.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
from flask_wtf import FlaskForm
import wtforms as f
from wtforms.validators import DataRequired
from wtforms import BooleanField
class AreaSearchForm(FlaskForm):
area = f.StringField('지역 명', validators=[DataRequired()], render_kw={"placeholder" : "지역 명"})
display = ['area']
class DaySearchForm(FlaskForm):
area = f.StringField('지역', validators=[DataRequired()], render_kw={"placeholder": "지역(ex : 경기도)"})
day = f.StringField('일', validators=[DataRequired()], render_kw={"placeholder": "일(ex : 01)"})
month = f.StringField('월', validators=[DataRequired()], render_kw={"placeholder": "월(ex : 01)"})
year = f.StringField('연', validators=[DataRequired()], render_kw={"placeholder": "연(ex : 2017)"})
display = ['area', 'year', 'month', 'day']
class MonthSearchForm(FlaskForm):
area = f.StringField('지역', validators=[DataRequired()], render_kw={"placeholder": "지역(ex : 경기도)"})
month = f.StringField('월', validators=[DataRequired()], render_kw={"placeholder": "월(ex : 01)"})
year = f.StringField('연', validators=[DataRequired()], render_kw={"placeholder": "연(ex : 2017)"})
display = ['area', 'year', 'month']
class YearSearchForm(FlaskForm):
area = f.StringField('지역', validators=[DataRequired()], render_kw={"placeholder": "지역(ex : 경기도)"})
year = f.StringField('연', validators=[DataRequired()], render_kw={"placeholder": "연(ex : 2017)"})
display = ['area', 'year']