jezdez/django_compressor — Issue #187: Trouble Serving from Cloudfront
Author: mattparrilla
Created: 2011-12-31 15:08:45+00:00
State: open

I want to serve my compressed CSS/JS from CloudFront (they live on S3), but am unable to work out how to do it via the compressor settings in settings.py, I have the following:

COMPRESS_OFFLINE = True
COMPRESS_URL = 'http://static.example.com/' #same as STATIC_URL, so unnecessary, just here for simplicity
COMPRESS_STORAGE = 'my_example_dir.storage.CachedS3BotoStorage' #subclass suggested in docs
COMPRESS_OUTPUT_DIR = 'compressed_static'
COMPRESS_ROOT = '/home/dotcloud/current/static/' #location of static files on server

Despite the COMPRESS_URL, my files are being read from my s3 bucket:
``

I guess the issue is I want to write the file to S3, but read it from CloudFront. Is this possible?

[Note: I also posted this over on SO, perhaps that is the more appropriate place for this kind of "issue", if that is the case--or if it's bad form to post in two places--my apologies. (and please, let me know!)]
http://stackoverflow.com/questions/8688815/django-compressor-how-to-write-to-s3-read-from-cloudfront