Skip to content

Instantly share code, notes, and snippets.

@bjinwright
Created July 12, 2016 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjinwright/990da644f3b3ea74e700801b15914adf to your computer and use it in GitHub Desktop.
Save bjinwright/990da644f3b3ea74e700801b15914adf to your computer and use it in GitHub Desktop.
Django Storages S3 custom folder based on settings
from django.conf import settings
from storages.backends.s3boto import S3BotoStorage
class StaticStorage(S3BotoStorage):
location = settings.STATICFILES_LOCATION
class MediaStorage(S3BotoStorage):
location = settings.MEDIAFILES_LOCATION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment