Skip to content

Instantly share code, notes, and snippets.

View danielbraun's full-sized avatar

Daniel Braun danielbraun

  • Tel-Aviv, Israel
View GitHub Profile
@danielbraun
danielbraun / gist:07604e7bd6f1650aa2e7
Last active August 29, 2015 14:10
django-storages + Amazon S3

For those of you trying to integrate django-storages with Amazon S3, don't select Frankfurt as the bucket region. Use the default region (US standard or something). You'll get into weird HTTP 400 errors otherwise.

Also, make sure that DEFAULT_FILE_STORAGE is 'storages.backends.s3boto.S3BotoStorage' The other engine mentioned, 'storages.backends.s3.S3Storage', is broken.

In addition, add AWS_QUERYSTRING_AUTH = False to your settings. Otherwise, django-storages breaks browser caching by default. SO Answer: http://stackoverflow.com/questions/15668443/django-storage-with-s3-boto-break-browser-cache/15710661#15710661

@danielbraun
danielbraun / gist:27e43b914c6a2e081792
Created November 24, 2014 12:11
Vim syntax coloring for Cocoapods' Podfile.
// Append this to your .vimrc
au BufNewFile,BufRead Podfile set filetype=ruby