Commit b5d8a2b4 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Make photo upload size a setting

parent 46049e85
......@@ -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")
......
......@@ -186,3 +186,6 @@ STATIC_PRECOMPILER_LIST_FILES = True
# Newsletter settings
NEWSLETTER_FROM_ADDRESS = 'nieuwsbrief@thalia.nu'
# Photos settings
PHOTO_UPLOAD_SIZE = 1920, 1080
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment