Browse Source
fix: use named var in f-string
My Python 3.11.2 explodes otherwise.
main
decentral1se
1 week ago
No known key found for this signature in database
GPG Key ID: 3789458B3D0C410
1 changed files with
2 additions and
2 deletions
-
upload.py
|
|
@ -17,13 +17,13 @@ APP.config["SECRET_KEY"] = os.urandom(24) |
|
|
|
|
|
|
|
class ImageUploadForm(FlaskForm): |
|
|
|
"""Image upload form.""" |
|
|
|
|
|
|
|
allowed = ", ".join(ALLOWED_FILES) |
|
|
|
image = FileField( |
|
|
|
"image:", |
|
|
|
validators=[ |
|
|
|
FileAllowed( |
|
|
|
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}", |
|
|
|
) |
|
|
|
], |
|
|
|
) |
|
|
|