From 9092af2b4960df9dbd643d4cc9c4e0f0a5d07ebe Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Sun, 19 Feb 2017 14:05:26 +0100 Subject: [PATCH] add /public/ to the start of upload_to --- src/program/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/program/models.py b/src/program/models.py index 6d9ffab6..f842960a 100644 --- a/src/program/models.py +++ b/src/program/models.py @@ -103,8 +103,8 @@ class EventInstance(CreatedUpdatedModel): def get_speaker_picture_upload_path(instance, filename): - """ We want speaker pictures are saved as MEDIA_ROOT/speakers/camp-slug/speaker-slug/filename """ - return 'speakers/%(campslug)s/%(speakerslug)s/%(filename)s' % { + """ We want speaker pictures are saved as MEDIA_ROOT/public/speakers/camp-slug/speaker-slug/filename """ + return 'public/speakers/%(campslug)s/%(speakerslug)s/%(filename)s' % { 'campslug': instance.camp.slug, 'speakerslug': instance.slug, 'filename': filename