I'm trying to move from serving files on Amazon S3 to Amazon CloudFront, so I updated my settings.py
. Previously, I had this:
S3_URL = 'http://{}.s3.amazonaws.com'.format(AWS_STORAGE_BUCKET_NAME)
STATIC_URL = S3_URL + STATIC_DIRECTORY
MEDIA_URL = S3_URL + MEDIA_DIRECTORY
I updated this as follows:
#S3_URL = 'http://{}.s3.amazonaws.com'.format(AWS_STORAGE_BUCKET_NAME)
S3_URL = 'http://d2ynhpzeiwwiom.cloudfront.net'
In the console, the settings are updated:
>>> from django.conf import settings
>>> settings.MEDIA_URL
'http://d2ynhpzeiwwiom.cloudfront.net/media/'
But not on my model's ImageField
:
>>> design.image.url
'https://bucketname.s3.amazonaws.com/media/images/designs/etc/etc'
What gives? Where is the old information still stored and how do I flush it out?