Merge pull request #22702 from cpennington/static-files-s3-configs

Load any AWS_ prefixed settings from ENV_TOKENS to allow S3Boto3Stora…
This commit is contained in:
Calen Pennington
2020-01-06 14:20:43 -05:00
committed by GitHub
5 changed files with 18 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ Django storage backends for Open edX.
"""
from django.conf import settings
from django.contrib.staticfiles.storage import StaticFilesStorage
from django.core.files.storage import get_storage_class, FileSystemStorage
from django.utils.deconstruct import deconstructible
@@ -51,7 +52,9 @@ class ProductionMixin(
can be applied over an existing Storage.
We use this version on production.
"""
pass
def __init__(self, *args, **kwargs):
kwargs.update(settings.STATICFILES_STORAGE_KWARGS.get(settings.STATICFILES_STORAGE, {}))
super(ProductionMixin, self).__init__(*args, **kwargs)
class ProductionStorage(ProductionMixin, StaticFilesStorage):