|
|
@ -3,7 +3,7 @@ from wtforms import StringField, FileField, validators
|
|
|
|
from wtforms.validators import InputRequired, DataRequired
|
|
|
|
from wtforms.validators import InputRequired, DataRequired
|
|
|
|
from wtforms import FieldList
|
|
|
|
from wtforms import FieldList
|
|
|
|
from wtforms import Form as NoCsrfForm
|
|
|
|
from wtforms import Form as NoCsrfForm
|
|
|
|
from wtforms.fields import StringField, FormField, SubmitField, SelectField
|
|
|
|
from wtforms.fields import StringField, FormField, SubmitField, SelectField, RadioField
|
|
|
|
from app.models import Book, BookSchema, Author, Stack, StackSchema
|
|
|
|
from app.models import Book, BookSchema, Author, Stack, StackSchema
|
|
|
|
|
|
|
|
|
|
|
|
# - - - Forms - - -
|
|
|
|
# - - - Forms - - -
|
|
|
@ -49,9 +49,12 @@ class SearchForm(FlaskForm):
|
|
|
|
('Author', 'Author'),
|
|
|
|
('Author', 'Author'),
|
|
|
|
('Category', 'Category'),
|
|
|
|
('Category', 'Category'),
|
|
|
|
('Stack', 'Stack')]
|
|
|
|
('Stack', 'Stack')]
|
|
|
|
select = SelectField('', choices=choices)
|
|
|
|
select = SelectField('', choices=choices, default='All')
|
|
|
|
search = StringField('', validators=[InputRequired()])
|
|
|
|
search = StringField('', validators=[InputRequired()])
|
|
|
|
grid = SubmitField('Grid')
|
|
|
|
grid = SubmitField('Grid')
|
|
|
|
listview = SubmitField('List')
|
|
|
|
listview = SubmitField('List')
|
|
|
|
|
|
|
|
randomize = SubmitField('Order differently')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|