title: How to configure django-compressor and django-staticfiles with Amazon's S3?
body: <p>I'm trying to setup <a href="https://github.com/jezdez/django_compressor/">django-compressor</a> and <a href="https://docs.djangoproject.com/en/dev/howto/static-files/">django-staticfiles</a> so that the compressed CSS/Javascript and images are served from Amazon's S3.</p>
  
  <p>I've managed to setup staticfiles using S3 as the backend so it's <code>collectstatic</code> command sends the files to S3 instead of <code>STATIC_ROOT</code>.</p>
  
  <p>However when trying to add <code>django-compressor</code> to the mix is where it all seems to fall apart for me. Following the <a href="http://readthedocs.org/docs/django_compressor/en/latest/remote-storages/">documentation</a> on setting up remote storages I've created a subclass of the storage backend, <a href="http://code.google.com/p/boto/">boto</a>, so I copied the <a href="http://readthedocs.org/docs/django_compressor/en/latest/remote-storages/#using-staticfiles">example</a> to <code>storage.py</code>. Once I start using this cached backend the files are copied into static_media and not S3. After the first page load the CACHE folder appears on S3 and in the static_media folder.</p>
  
  <p>Setting <code>STATICFILES_STORAGE</code> and <code>COMPRESS_STORAGE</code> back to boto's normal S3 class (<code>storages.backends.s3boto.S3BotoStorage</code>) results in the static assets being collected into the S3 bucket and no static_media folder. However trying to reload the page throws the error:</p>
  
  <pre><code>Caught NotImplementedError while rendering: This backend doesn't support absolute paths.
  </code></pre>
  
  <p>highlighting <code>{% compress css %}</code> as the tag and <code>compressor/base.py</code> as the origin.</p>
  
  <p>The s3/staticfiles/compressor section of my <code>settings.py</code>:</p>
  
  <pre><code>DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
  AWS_ACCESS_KEY_ID = 'key'
  AWS_SECRET_ACCESS_KEY ='secret'
  AWS_STORAGE_BUCKET_NAME = 'my-bucket'
  S3_URL = 'http://my-bucket.s3.amazonaws.com/'
  
  MEDIA_ROOT = 'client_media'
  MEDIA_URL = '/media/'
  STATIC_ROOT = 'static_media'
  STATIC_URL = S3_URL
  ADMIN_MEDIA_PREFIX = S3_URL + 'admin/'
  STATICFILES_DIRS = (
      join(DIRNAME, 'static'),
  )
  STATICFILES_FINDERS = (
      'django.contrib.staticfiles.finders.FileSystemFinder',
      'django.contrib.staticfiles.finders.AppDirectoriesFinder',
      'compressor.finders.CompressorFinder',
  )
  
  COMPRESS_ENABLED = True
  COMPRESS_URL = S3_URL
  COMPRESS_ROOT = STATIC_ROOT
  COMPRESS_STORAGE = 'storage.CachedS3BotoStorage'
  STATICFILES_STORAGE = COMPRESS_STORAGE
  </code></pre>
  
  <p>So where am I going wrong? Have I mis-configured something when using the <code>CachedS3BotoStorage</code> custom storage maybe?</p>