@@ -222,7 +222,8 @@ def get_env_setting(setting):
222222# we need to run asset collection twice, once for local disk and once for S3.
223223# Once we have migrated to service assets off S3, then we can convert this back to
224224# managed by the yaml file contents
225- STATICFILES_STORAGE = os .environ .get ('STATICFILES_STORAGE' , STATICFILES_STORAGE )
225+ STORAGES ['staticfiles' ]['BACKEND' ] = os .environ .get (
226+ 'STATICFILES_STORAGE' , STORAGES ['staticfiles' ]['BACKEND' ])
226227CSRF_TRUSTED_ORIGINS = _YAML_TOKENS .get ("CSRF_TRUSTED_ORIGINS" , [])
227228
228229MKTG_URL_LINK_MAP .update (_YAML_TOKENS .get ('MKTG_URL_LINK_MAP' , {}))
@@ -265,19 +266,19 @@ def get_env_setting(setting):
265266
266267# Change to S3Boto3 if we haven't specified another default storage AND we have specified AWS creds.
267268if (not _YAML_TOKENS .get ('DEFAULT_FILE_STORAGE' )) and AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY :
268- DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
269+ STORAGES [ "default" ][ "BACKEND" ] = 'storages.backends.s3boto3.S3Boto3Storage'
269270
270271if COURSE_IMPORT_EXPORT_BUCKET :
271272 COURSE_IMPORT_EXPORT_STORAGE = 'cms.djangoapps.contentstore.storage.ImportExportS3Storage'
272273else :
273- COURSE_IMPORT_EXPORT_STORAGE = DEFAULT_FILE_STORAGE
274+ COURSE_IMPORT_EXPORT_STORAGE = STORAGES [ "default" ][ "BACKEND" ]
274275
275276USER_TASKS_ARTIFACT_STORAGE = COURSE_IMPORT_EXPORT_STORAGE
276277
277278if COURSE_METADATA_EXPORT_BUCKET :
278279 COURSE_METADATA_EXPORT_STORAGE = 'cms.djangoapps.export_course_metadata.storage.CourseMetadataExportS3Storage'
279280else :
280- COURSE_METADATA_EXPORT_STORAGE = DEFAULT_FILE_STORAGE
281+ COURSE_METADATA_EXPORT_STORAGE = STORAGES [ "default" ][ "BACKEND" ]
281282
282283# The normal database user does not have enough permissions to run migrations.
283284# Migrations are run with separate credentials, given as DB_MIGRATION_*
0 commit comments