title: How to set-up a Django project with django-storages and Amazon S3, but with different folders for static files and media files?
body: <p>I'm configuring a Django project that were using the server filesystem for storing the apps static files (<code>STATIC_ROOT</code>) and user uploaded files (<code>MEDIA_ROOT</code>).</p>
  
  <p>I need now to host all that content on Amazon's S3, so I have created a bucket for this. Using <a href="http://readthedocs.org/docs/django-storages/en/latest/" rel="noreferrer"><code>django-storages</code></a> with the <code>boto</code> storage backend, I managed to upload collected statics to the S3 bucket:</p>
  
  <pre><code>MEDIA_ROOT = '/media/'
  STATIC_ROOT = '/static/'
  
  DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
  AWS_ACCESS_KEY_ID = 'KEY_ID...'
  AWS_SECRET_ACCESS_KEY = 'ACCESS_KEY...'
  AWS_STORAGE_BUCKET_NAME = 'bucket-name'
  STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
  </code></pre>
  
  <p>Then, I got a problem: the <code>MEDIA_ROOT</code> and <code>STATIC_ROOT</code> are not used within the bucket, so the bucket root contains both the static files and user uploaded paths.</p>
  
  <p>So then I could set:</p>
  
  <pre><code>S3_URL = 'http://s3.amazonaws.com/%s' % AWS_STORAGE_BUCKET_NAME
  STATIC_URL = S3_URL + STATIC_ROOT
  MEDIA_URL = 'S3_URL + MEDIA_ROOT
  </code></pre>
  
  <p>And use those settings in the templates, but there is no distinction of static/media files when storing in S3 with <code>django-storages</code>.</p>
  
  <p>How this can be done?</p>
  
  <p>Thanks!</p>