We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc76170 commit ff54363Copy full SHA for ff54363
1 file changed
notesserver/settings/yaml_config.py
@@ -26,6 +26,25 @@
26
with open(CONFIG_ROOT / "edx_notes_api.yml") as yaml_file:
27
config_from_yaml = yaml.safe_load(yaml_file)
28
29
+
30
+STORAGES = {
31
+ "default": {
32
+ "BACKEND": "django.core.files.storage.FileSystemStorage",
33
+ },
34
+ "staticfiles": {
35
+ "BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage",
36
37
+}
38
39
40
+default_file_storage = config_from_yaml.pop('DEFAULT_FILE_STORAGE', None)
41
+staticfiles_storage = config_from_yaml.pop('STATICFILES_STORAGE', None)
42
43
+if default_file_storage:
44
+ STORAGES["default"]["BACKEND"] = default_file_storage
45
+if staticfiles_storage:
46
+ STORAGES["staticfiles"]["BACKEND"] = staticfiles_storage
47
48
vars().update(config_from_yaml)
49
50
# Support environment overrides for migrations
0 commit comments