Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
b5d8a2b4
Commit
b5d8a2b4
authored
Sep 21, 2016
by
Sébastiaan Versteeg
Browse files
Make photo upload size a setting
parent
46049e85
Changes
2
Hide whitespace changes
Inline
Side-by-side
website/photos/models.py
View file @
b5d8a2b4
...
...
@@ -34,7 +34,7 @@ class Photo(models.Model):
image_path
=
str
(
self
.
file
.
path
)
image
=
Image
.
open
(
image_path
)
image
.
thumbnail
(
(
1920
,
1080
)
,
Image
.
ANTIALIAS
)
image
.
thumbnail
(
settings
.
PHOTO_UPLOAD_SIZE
,
Image
.
ANTIALIAS
)
image
.
save
(
image_path
,
"JPEG"
)
...
...
website/thaliawebsite/settings/settings.py
View file @
b5d8a2b4
...
...
@@ -186,3 +186,6 @@ STATIC_PRECOMPILER_LIST_FILES = True
# Newsletter settings
NEWSLETTER_FROM_ADDRESS
=
'nieuwsbrief@thalia.nu'
# Photos settings
PHOTO_UPLOAD_SIZE
=
1920
,
1080
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment