|
@ -1,8 +1,13 @@ |
|
|
"""Form object declaration.""" |
|
|
"""Form object declaration.""" |
|
|
from flask_wtf import FlaskForm |
|
|
from flask_wtf import FlaskForm |
|
|
from flask_wtf.file import FileAllowed, FileField |
|
|
from flask_wtf.file import FileAllowed, FileField |
|
|
from wtforms import (IntegerField, RadioField, StringField, SubmitField, |
|
|
from wtforms import ( |
|
|
validators) |
|
|
IntegerField, |
|
|
|
|
|
RadioField, |
|
|
|
|
|
StringField, |
|
|
|
|
|
SubmitField, |
|
|
|
|
|
validators, |
|
|
|
|
|
) |
|
|
from wtforms.validators import Length, NumberRange |
|
|
from wtforms.validators import Length, NumberRange |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -33,7 +38,7 @@ class PublicationForm(FlaskForm): |
|
|
year = IntegerField( |
|
|
year = IntegerField( |
|
|
"Year:", |
|
|
"Year:", |
|
|
[validators.InputRequired(), NumberRange(min=0, max=2050)], |
|
|
[validators.InputRequired(), NumberRange(min=0, max=2050)], |
|
|
default=2023 |
|
|
default=2023, |
|
|
) |
|
|
) |
|
|
fields = StringField("Fields:") |
|
|
fields = StringField("Fields:") |
|
|
type = StringField( |
|
|
type = StringField( |
|
|