[Django]-Error when trying to compress static files when using django-storages and django-compressor together

7👍

I fixed it by adding one variable and it worked:

AWS_S3_CUSTOM_DOMAIN = 'my_bucket.s3-external-3.amazonaws.com'
👤Oms

1👍

If you have separate S3 buckets for static and media you can also put it in your subclass of S3BotoStorage like so:

class CachedS3BotoStorage(S3BotoStorage):
  custom_domain = 'my_bucket.s3-external-3.amazonaws.com'

(or better yet set it to settings.AWS_S3_CUSTOM_STATIC_DOMAIN or something)

Leave a comment