Skip to content

Commit 8d1c033

Browse files
chore: remove deprecated storage related settings (#172)
This change refactors the code to replace the deprecated DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings with the more flexible and recommended STORAGES = {} pattern.
1 parent f7f0836 commit 8d1c033

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

py_configuration_files/cms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from .production import * # pylint: disable=wildcard-import, unused-wildcard-import
1010

1111
# Don't use S3 in devstack, fall back to filesystem
12-
del DEFAULT_FILE_STORAGE
12+
STORAGES['default']['BACKEND'] = 'django.core.files.storage.FileSystemStorage'
1313
COURSE_IMPORT_EXPORT_STORAGE = 'django.core.files.storage.FileSystemStorage'
1414
USER_TASKS_ARTIFACT_STORAGE = COURSE_IMPORT_EXPORT_STORAGE
1515

@@ -57,7 +57,7 @@
5757

5858
# Skip packaging and optimization in development
5959
PIPELINE['PIPELINE_ENABLED'] = False
60-
STATICFILES_STORAGE = 'openedx.core.storage.DevelopmentStorage'
60+
STORAGES['staticfiles']['BACKEND'] = 'openedx.core.storage.DevelopmentStorage'
6161

6262
# Revert to the default set of finders as we don't want the production pipeline
6363
STATICFILES_FINDERS = [

py_configuration_files/lms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from .production import * # pylint: disable=wildcard-import, unused-wildcard-import
1717

1818
# Don't use S3 in devstack, fall back to filesystem
19-
del DEFAULT_FILE_STORAGE
19+
STORAGES['default']['BACKEND'] = 'django.core.files.storage.FileSystemStorage'
2020
ORA2_FILEUPLOAD_BACKEND = 'django'
2121

2222

@@ -118,7 +118,7 @@ def should_show_debug_toolbar(request): # lint-amnesty, pylint: disable=missing
118118
########################### PIPELINE #################################
119119

120120
PIPELINE['PIPELINE_ENABLED'] = False
121-
STATICFILES_STORAGE = 'openedx.core.storage.DevelopmentStorage'
121+
STORAGES['staticfiles']['BACKEND'] = 'openedx.core.storage.DevelopmentStorage'
122122

123123
# Revert to the default set of finders as we don't want the production pipeline
124124
STATICFILES_FINDERS = [

0 commit comments

Comments
 (0)