Commit 7f7dbed3 by Simon Chen

The image served from course and people object should have better names

We need a new name/path for the new image updated to these objects because cache would keep the old image alive all the time
LEARNER-3455
parent 8e335a4c
......@@ -265,7 +265,7 @@ class Person(TimeStampedModel):
bio = models.TextField(null=True, blank=True)
profile_image_url = models.URLField(null=True, blank=True)
profile_image = StdImageField(
upload_to=UploadToAutoSlug(populate_from='uuid', path='media/people/profile_images'),
upload_to=UploadToFieldNamePath(populate_from='uuid', path='media/people/profile_images'),
blank=True,
null=True,
variations={
......@@ -347,7 +347,7 @@ class Course(TimeStampedModel):
syllabus_raw = models.TextField(blank=True, null=True)
card_image_url = models.URLField(null=True, blank=True)
image = StdImageField(
upload_to=UploadToAutoSlug(populate_from='uuid', path='media/course/image'),
upload_to=UploadToFieldNamePath(populate_from='uuid', path='media/course/image'),
blank=True,
null=True,
variations={
......
Markdown is supported
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