|
|
@ -31,7 +31,9 @@ class PublicationForm(FlaskForm): |
|
|
|
], |
|
|
|
) |
|
|
|
year = IntegerField( |
|
|
|
"Year:", [validators.InputRequired(), NumberRange(min=0, max=2050)] |
|
|
|
"Year:", |
|
|
|
[validators.InputRequired(), NumberRange(min=0, max=2050)], |
|
|
|
default=2023 |
|
|
|
) |
|
|
|
fields = StringField("Fields:") |
|
|
|
type = StringField( |
|
|
@ -55,6 +57,10 @@ class PublicationForm(FlaskForm): |
|
|
|
"Image of the book:", |
|
|
|
validators=[FileAllowed(["jpg", "png", "gif"], "Images only!")], |
|
|
|
) |
|
|
|
pdf = FileField( |
|
|
|
"Pdf of the book:", |
|
|
|
validators=[FileAllowed(["pdf"], "Only pdf uploads supported")], |
|
|
|
) |
|
|
|
secret = StringField( |
|
|
|
"Librarians secret:", |
|
|
|
[ |
|
|
|