diff --git a/ietf/person/migrations/0011_populate_photos.py b/ietf/person/migrations/0011_populate_photos.py index c47895ffa..0d69ae205 100644 --- a/ietf/person/migrations/0011_populate_photos.py +++ b/ietf/person/migrations/0011_populate_photos.py @@ -24,10 +24,10 @@ def forward(apps,schema_editor): for person in Person.objects.all(): dirty = False if photo_name(person,thumb=False) in image_basenames: - person.photo = os.path.join(settings.PHOTO_URL_PREFIX, image_filenames[image_basenames.index(photo_name(person,thumb=False))]) + person.photo = os.path.join(settings.PHOTOS_DIRNAME, image_filenames[image_basenames.index(photo_name(person,thumb=False))]) dirty = True if photo_name(person,thumb=True) in image_basenames: - person.photo_thumb = os.path.join(settings.PHOTO_URL_PREFIX, image_filenames[image_basenames.index(photo_name(person,thumb=True))]) + person.photo_thumb = os.path.join(settings.PHOTOS_DIRNAME, image_filenames[image_basenames.index(photo_name(person,thumb=True))]) dirty = True if dirty: person.save() diff --git a/ietf/person/models.py b/ietf/person/models.py index 33d1d8a9a..027d71d15 100644 --- a/ietf/person/models.py +++ b/ietf/person/models.py @@ -28,8 +28,8 @@ class PersonInfo(models.Model): affiliation = models.CharField(max_length=255, blank=True, help_text="Employer, university, sponsor, etc.") address = models.TextField(max_length=255, blank=True, help_text="Postal mailing address.") biography = models.TextField(blank=True, help_text="Short biography for use on leadership pages.") - photo = models.ImageField(storage=NoLocationMigrationFileSystemStorage(location=settings.PHOTOS_DIR),upload_to=settings.PHOTO_URL_PREFIX,blank=True) - photo_thumb = models.ImageField(storage=NoLocationMigrationFileSystemStorage(location=settings.PHOTOS_DIR),upload_to=settings.PHOTO_URL_PREFIX,blank=True) + photo = models.ImageField(storage=NoLocationMigrationFileSystemStorage(location=settings.PHOTOS_DIR),upload_to=settings.PHOTOS_DIRNAME,blank=True) + photo_thumb = models.ImageField(storage=NoLocationMigrationFileSystemStorage(location=settings.PHOTOS_DIR),upload_to=settings.PHOTOS_DIRNAME,blank=True) def __unicode__(self): return self.plain_name()