Read STATICFILES_STORAGE_KWARGS from config to allow separate storage configuration for static assets

This commit is contained in:
Calen Pennington
2020-01-07 14:03:37 -05:00
parent 7889386178
commit dd5f85c870
2 changed files with 2 additions and 0 deletions

View File

@@ -213,6 +213,7 @@ if 'staticfiles' in CACHES:
# Once we have migrated to service assets off S3, then we can convert this back to
# managed by the yaml file contents
STATICFILES_STORAGE = os.environ.get('STATICFILES_STORAGE', ENV_TOKENS.get('STATICFILES_STORAGE', STATICFILES_STORAGE))
STATICFILES_STORAGE_KWARGS = ENV_TOKENS.get('STATICFILES_STORAGE_KWARGS', STATICFILES_STORAGE_KWARGS)
# Load all AWS_ prefixed variables to allow an S3Boto3Storage to be configured
_locals = locals()

View File

@@ -249,6 +249,7 @@ if 'staticfiles' in CACHES:
# Once we have migrated to service assets off S3, then we can convert this back to
# managed by the yaml file contents
STATICFILES_STORAGE = os.environ.get('STATICFILES_STORAGE', ENV_TOKENS.get('STATICFILES_STORAGE', STATICFILES_STORAGE))
STATICFILES_STORAGE_KWARGS = ENV_TOKENS.get('STATICFILES_STORAGE_KWARGS', STATICFILES_STORAGE_KWARGS)
# Load all AWS_ prefixed variables to allow an S3Boto3Storage to be configured
_locals = locals()