Everybody will wear black like me
This commit is contained in:
parent
a48ae5310e
commit
ab84fc8229
@ -1,63 +1,45 @@
|
|||||||
"""Form object declaration."""
|
"""Form object declaration."""
|
||||||
from flask_wtf import FlaskForm
|
from flask_wtf import FlaskForm
|
||||||
from wtforms import StringField, IntegerField, TextField, RadioField, SubmitField
|
from wtforms import (
|
||||||
|
StringField,
|
||||||
|
IntegerField,
|
||||||
|
TextField,
|
||||||
|
RadioField,
|
||||||
|
SubmitField,
|
||||||
|
)
|
||||||
from wtforms.validators import DataRequired, Length
|
from wtforms.validators import DataRequired, Length
|
||||||
|
|
||||||
|
|
||||||
class PublicationForm(FlaskForm):
|
class PublicationForm(FlaskForm):
|
||||||
"""Contact form."""
|
"""Contact form."""
|
||||||
|
|
||||||
uploadpublication = StringField(
|
uploadpublication = StringField(
|
||||||
'Title of the publication:',
|
"Title of the publication:", [DataRequired()]
|
||||||
[DataRequired()]
|
|
||||||
)
|
|
||||||
author = StringField(
|
|
||||||
'The author or editor:',
|
|
||||||
[DataRequired()]
|
|
||||||
)
|
|
||||||
year = IntegerField(
|
|
||||||
'Year:',
|
|
||||||
[DataRequired()]
|
|
||||||
)
|
|
||||||
custodian = StringField(
|
|
||||||
'Custodian:',
|
|
||||||
[DataRequired()]
|
|
||||||
)
|
|
||||||
fields = StringField(
|
|
||||||
'Fields:',
|
|
||||||
[DataRequired()]
|
|
||||||
)
|
|
||||||
type = StringField(
|
|
||||||
'Type:',
|
|
||||||
[DataRequired()]
|
|
||||||
)
|
|
||||||
publishers = StringField(
|
|
||||||
'Publishers:',
|
|
||||||
[DataRequired()]
|
|
||||||
)
|
|
||||||
license = StringField(
|
|
||||||
'License:',
|
|
||||||
[DataRequired()]
|
|
||||||
)
|
)
|
||||||
|
author = StringField("The author or editor:", [DataRequired()])
|
||||||
|
year = IntegerField("Year:", [DataRequired()])
|
||||||
|
custodian = StringField("Custodian:", [DataRequired()])
|
||||||
|
fields = StringField("Fields:", [DataRequired()])
|
||||||
|
type = StringField("Type:", [DataRequired()])
|
||||||
|
publishers = StringField("Publishers:", [DataRequired()])
|
||||||
|
license = StringField("License:", [DataRequired()])
|
||||||
licenseshort = RadioField(
|
licenseshort = RadioField(
|
||||||
'Select the closest license type:',
|
"Select the closest license type:",
|
||||||
choices=[
|
choices=[
|
||||||
('Anti-copyright','Anti-copyright'),
|
("Anti-copyright", "Anti-copyright"),
|
||||||
('No License Mentioned','No License Mentioned'),
|
("No License Mentioned", "No License Mentioned"),
|
||||||
('Free Art License','Free Art License'),
|
("Free Art License", "Free Art License"),
|
||||||
('Copyright','Copyright'),
|
("Copyright", "Copyright"),
|
||||||
('Copyleft','Copyleft'),
|
("Copyleft", "Copyleft"),
|
||||||
('Creative Commons','Creative Commons'),
|
("Creative Commons", "Creative Commons"),
|
||||||
('Public Domain','Public Domain'),
|
("Public Domain", "Public Domain"),
|
||||||
('GNU Free Documentation License','GNU Free Documentation License'),
|
(
|
||||||
]
|
"GNU Free Documentation License",
|
||||||
|
"GNU Free Documentation License",
|
||||||
|
),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
highlights = TextField(
|
highlights = TextField("Highlights from the publication:")
|
||||||
'Highlights from the publication:'
|
comments = TextField("Comments on the publication:")
|
||||||
)
|
borrowed = StringField("Currently borrowed by:")
|
||||||
comments = TextField(
|
submit = SubmitField("Submit")
|
||||||
'Comments on the publication:'
|
|
||||||
)
|
|
||||||
borrowed = StringField(
|
|
||||||
'Currently borrowed by:'
|
|
||||||
)
|
|
||||||
submit = SubmitField('Submit')
|
|
||||||
|
24
pyproject.toml
Normal file
24
pyproject.toml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
[tool.black]
|
||||||
|
line-length = 79
|
||||||
|
target-version = ['py37', 'py38', 'py39']
|
||||||
|
include = '\.pyi?$'
|
||||||
|
exclude = '''
|
||||||
|
/(
|
||||||
|
\.eggs
|
||||||
|
| \.git
|
||||||
|
| \.hg
|
||||||
|
| \.mypy_cache
|
||||||
|
| \.tox
|
||||||
|
| \.venv
|
||||||
|
| _build
|
||||||
|
| buck-out
|
||||||
|
| build
|
||||||
|
| dist
|
||||||
|
|
||||||
|
# The following are specific to Black, you probably don't want those.
|
||||||
|
| blib2to3
|
||||||
|
| tests/data
|
||||||
|
| profiling
|
||||||
|
)/
|
||||||
|
'''
|
||||||
|
|
Loading…
Reference in New Issue
Block a user