Fixed some missed instances of a setting name-change.
- Legacy-Id: 11266
This commit is contained in:
parent
c8ade2dff5
commit
1410168a5a
|
@ -24,10 +24,10 @@ def forward(apps,schema_editor):
|
||||||
for person in Person.objects.all():
|
for person in Person.objects.all():
|
||||||
dirty = False
|
dirty = False
|
||||||
if photo_name(person,thumb=False) in image_basenames:
|
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
|
dirty = True
|
||||||
if photo_name(person,thumb=True) in image_basenames:
|
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
|
dirty = True
|
||||||
if dirty:
|
if dirty:
|
||||||
person.save()
|
person.save()
|
||||||
|
|
|
@ -28,8 +28,8 @@ class PersonInfo(models.Model):
|
||||||
affiliation = models.CharField(max_length=255, blank=True, help_text="Employer, university, sponsor, etc.")
|
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.")
|
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.")
|
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 = 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.PHOTO_URL_PREFIX,blank=True)
|
photo_thumb = models.ImageField(storage=NoLocationMigrationFileSystemStorage(location=settings.PHOTOS_DIR),upload_to=settings.PHOTOS_DIRNAME,blank=True)
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return self.plain_name()
|
return self.plain_name()
|
||||||
|
|
Loading…
Reference in a new issue