PCv5/app/forms/search.py

14 lines
470 B
Python
Raw Normal View History

2019-02-03 16:52:42 +01:00
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField
2022-04-14 20:01:45 +02:00
from wtforms.fields.datetime 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 SearchForm(FlaskForm):
2020-09-23 20:53:06 +02:00
q = StringField('Rechercher', validators=[InputRequired()])
class AdvancedSearchForm(SearchForm):
date = DateField('Date', validators=[Optional()])
submit = SubmitField('Affiner la recherche')