Created
March 5, 2012 13:58
-
-
Save BigglesZX/1978416 to your computer and use it in GitHub Desktop.
Django settings for S3-based media files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
We use S3 as our media backend on Heroku, so set that up | |
''' | |
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' | |
AWS_ACCESS_KEY_ID = "YOUR_AWS_KEY" | |
AWS_SECRET_ACCESS_KEY = "YOUR_AWS_SECRET" | |
AWS_STORAGE_BUCKET_NAME = "YOUR_S3_BUCKET_NAME" | |
''' | |
Adjust media URL to point directly to S3 | |
''' | |
MEDIA_URL = 'http://your_s3_bucket_name.s3.amazonaws.com/' | |
''' | |
Adjust thumbnail storage | |
''' | |
THUMBNAIL_DEFAULT_STORAGE = DEFAULT_FILE_STORAGE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment