Snippets Collections
AWS_ACCESS_KEY_ID = your_access_key_id
AWS_SECRET_ACCESS_KEY = your_secret_access_key
AWS_STORAGE_BUCKET_NAME = 'sibtc-static'
AWS_S3_CUSTOM_DOMAIN = '%s.s3.amazonaws.com' % AWS_STORAGE_BUCKET_NAME
AWS_S3_OBJECT_PARAMETERS = {
    'CacheControl': 'max-age=86400',
}
AWS_LOCATION = 'static'
  
STATIC_URL = 'https://%s/%s/' % (AWS_S3_CUSTOM_DOMAIN, AWS_LOCATION)
STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage
star

Mon Oct 04 2021 19:48:40 GMT+0000 (Coordinated Universal Time) https://stackabuse.com/serving-static-files-in-python-with-django-aws-s3-and-whitenoise/

#django #aws #awss3

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension