PCv5/app/forms/search.py

33 lines
689 B
Python
Raw Normal View History

2019-02-03 16:52:42 +01:00
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField
from wtforms.fields.html5 import DateField
from wtforms.validators import InputRequired, Optional
2019-02-03 16:52:42 +01:00
2019-02-03 16:52:42 +01:00
# TODO: compléter le formulaire de recherche avancée
class AdvancedSearchForm(FlaskForm):
q = StringField(
'Rechercher :',
validators=[
InputRequired(),
],
)
date = DateField(
'Date',
validators=[
Optional(),
],
)
submit = SubmitField(
'Affiner la recherche',
)
2019-02-03 16:52:42 +01:00
2019-02-03 16:52:42 +01:00
class SearchForm(FlaskForm):
q = StringField(
'Rechercher',
validators=[
InputRequired(),
],
)