Created
July 2, 2020 07:29
-
-
Save velotiotech/71d013e77a0ea0892a31f0a3c7dbcd51 to your computer and use it in GitHub Desktop.
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
$ pip install django-storages boto | |
Add Django-Storage to your INSTALLED_APPS in settings.py | |
INSTALLED_APPS = ( | |
..., | |
storages', | |
) | |
Configure Django-storage in settings.py as | |
AWS_STORAGE_BUCKET_NAME = 'django-zappa-sample-bucket' | |
AWS_S3_CUSTOM_DOMAIN = '%s.s3.amazonaws.com' % AWS_STORAGE_BUCKET_NAME | |
STATIC_URL = "https://%s/" % AWS_S3_CUSTOM_DOMAIN | |
STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment