add /public/ to the start of upload_to

This commit is contained in:
Thomas Steen Rasmussen 2017-02-19 14:05:26 +01:00
parent 3e7b85c53f
commit 9092af2b49

View file

@ -103,8 +103,8 @@ class EventInstance(CreatedUpdatedModel):
def get_speaker_picture_upload_path(instance, filename): def get_speaker_picture_upload_path(instance, filename):
""" We want speaker pictures are saved as MEDIA_ROOT/speakers/camp-slug/speaker-slug/filename """ """ We want speaker pictures are saved as MEDIA_ROOT/public/speakers/camp-slug/speaker-slug/filename """
return 'speakers/%(campslug)s/%(speakerslug)s/%(filename)s' % { return 'public/speakers/%(campslug)s/%(speakerslug)s/%(filename)s' % {
'campslug': instance.camp.slug, 'campslug': instance.camp.slug,
'speakerslug': instance.slug, 'speakerslug': instance.slug,
'filename': filename 'filename': filename