fix: use named var in f-string
My Python 3.11.2 explodes otherwise.
This commit is contained in:
parent
a9675c5b7f
commit
de85c36510
@ -17,13 +17,13 @@ APP.config["SECRET_KEY"] = os.urandom(24)
|
|||||||
|
|
||||||
class ImageUploadForm(FlaskForm):
|
class ImageUploadForm(FlaskForm):
|
||||||
"""Image upload form."""
|
"""Image upload form."""
|
||||||
|
allowed = ", ".join(ALLOWED_FILES)
|
||||||
image = FileField(
|
image = FileField(
|
||||||
"image:",
|
"image:",
|
||||||
validators=[
|
validators=[
|
||||||
FileAllowed(
|
FileAllowed(
|
||||||
ALLOWED_FILES,
|
ALLOWED_FILES,
|
||||||
f"Images only, please use any of the following file extensions: {(", ").join(ALLOWED_FILES)}",
|
f"Images only, please use any of the following file extensions: {allowed}",
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user