Skip to content

Instantly share code, notes, and snippets.

@kalda341
Created September 11, 2018 02:21
Show Gist options
  • Save kalda341/7e980837ca7a0de64c71810bf8dd380f to your computer and use it in GitHub Desktop.
Save kalda341/7e980837ca7a0de64c71810bf8dd380f to your computer and use it in GitHub Desktop.
def url(self, *args, **kwargs): # pylint: disable=arguments-differ
# Use CloudFront domain instead of S3
url = urlparse(super().url(*args, **kwargs))
url.netloc = settings.SLIDE_CONVERTED_CLOUDFRONT_DOMAIN
return url.geturl()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment