title: Django custom static files not collected to s3 bucket
body: <p>I'm configuring my Django project to use S3 buckets to store static and media files, both for local and production settings.</p>
  
  <p>My project tree is as follows:</p>
  
  <pre><code>   src/
        blog/
            settings/
                    __init__
                    local.py
                    production.py
            s3utils.py
            [..]
        [..]
  </code></pre>
  
  <p>My <code>local.py</code>:</p>
  
  <pre><code>access_key = "xx"
  secret_key = "yy"
  
  AWS_ACCESS_KEY_ID = access_key
  AWS_SECRET_ACCESS_KEY = secret_key
  AWS_STORAGE_BUCKET_NAME = 'zz'
  
  
  STATICFILES_STORAGE = 'blog.s3utils.StaticRootS3BotoStorage'
  DEFAULT_FILE_STORAGE = 'blog.s3utils.MediaRootS3BotoStorage'
  S3DIRECT_REGION = 'us-west-2'
  S3_URL = 'http://%s.s3.amazonaws.com/' % AWS_STORAGE_BUCKET_NAME
  MEDIA_URL = 'http://%s.s3.amazonaws.com/media/' % AWS_STORAGE_BUCKET_NAME
  MEDIA_ROOT = MEDIA_URL
  STATIC_URL = S3_URL + "/static/"
  ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/'
  
  import datetime
  
  two_months = datetime.timedelta(days=61)
  date_two_months_later = datetime.date.today() + two_months
  expires = date_two_months_later.strftime("%A, %d %B %Y 20:00:00 GMT")
  
  AWS_HEADERS = { 
      'Expires': expires,
      'Cache-Control': 'max-age=%d' % (int(two_months.total_seconds()), ),
  }
  </code></pre>
  
  <p>my <code>s3utils.py</code>:</p>
  
  <pre><code>from storages.backends.s3boto import S3BotoStorage
  
  StaticRootS3BotoStorage = lambda: S3BotoStorage(location='static') 
  MediaRootS3BotoStorage  = lambda: S3BotoStorage(location='media') 
  </code></pre>
  
  <p>When I run:</p>
  
  <pre><code>python manage.py collectstatic
  </code></pre>
  
  <p>only (django) admin static files are copied to my s3 bucket.</p>
  
  <p>I thought that the problem was that I misconfigured the permission of my IAM user, but actually I do have the permissions to copy the <code>'admin/'</code> files to the s3 bucket.</p>
  
  <p>Thank you for any help you can provide.</p>