Commit b05e6a40 by Simon Chen Committed by GitHub

Merge pull request #235 from edx/schen/ECOM-5126

ECOM-5126 create the course-discovery setup for storage backend
parents a5800aac 8ddd65d0
...@@ -43,6 +43,7 @@ THIRD_PARTY_APPS = [ ...@@ -43,6 +43,7 @@ THIRD_PARTY_APPS = [
'compressor', 'compressor',
'django_filters', 'django_filters',
'django_fsm', 'django_fsm',
'storages',
] ]
PROJECT_APPS = [ PROJECT_APPS = [
......
...@@ -19,6 +19,9 @@ LOGGING['handlers']['local']['level'] = 'INFO' ...@@ -19,6 +19,9 @@ LOGGING['handlers']['local']['level'] = 'INFO'
# the values read from disk should UPDATE the pre-configured dicts. # the values read from disk should UPDATE the pre-configured dicts.
DICT_UPDATE_KEYS = ('JWT_AUTH',) DICT_UPDATE_KEYS = ('JWT_AUTH',)
# This may be overridden by the YAML in PROGRAMS_CFG, but it should be here as a default.
MEDIA_STORAGE_BACKEND = {}
CONFIG_FILE = get_env_setting('COURSE_DISCOVERY_CFG') CONFIG_FILE = get_env_setting('COURSE_DISCOVERY_CFG')
with open(CONFIG_FILE) as f: with open(CONFIG_FILE) as f:
config_from_yaml = yaml.load(f) config_from_yaml = yaml.load(f)
...@@ -33,6 +36,11 @@ with open(CONFIG_FILE) as f: ...@@ -33,6 +36,11 @@ with open(CONFIG_FILE) as f:
vars().update(config_from_yaml) vars().update(config_from_yaml)
# Unpack media storage settings.
# It's important we unpack here because of https://github.com/edx/configuration/pull/3307
vars().update(MEDIA_STORAGE_BACKEND)
if 'EXTRA_APPS' in locals(): if 'EXTRA_APPS' in locals():
INSTALLED_APPS += EXTRA_APPS INSTALLED_APPS += EXTRA_APPS
......
boto==2.42.0
cryptography==1.4 cryptography==1.4
django==1.8.14 django==1.8.14
django-choices==1.4.3 django-choices==1.4.3
...@@ -10,6 +11,7 @@ django-haystack==2.4.1 ...@@ -10,6 +11,7 @@ django-haystack==2.4.1
django-libsass==0.7 django-libsass==0.7
django-simple-history==1.8.1 django-simple-history==1.8.1
django-sortedm2m==1.3.2 django-sortedm2m==1.3.2
django-storages==1.5.0
django-waffle==0.11.1 django-waffle==0.11.1
djangorestframework==3.3.3 djangorestframework==3.3.3
djangorestframework-csv==1.4.1 djangorestframework-csv==1.4.1
...@@ -26,6 +28,7 @@ edx-opaque-keys==0.3.1 ...@@ -26,6 +28,7 @@ edx-opaque-keys==0.3.1
edx-rest-api-client==1.6.0 edx-rest-api-client==1.6.0
elasticsearch>=1.0.0,<2.0.0 elasticsearch>=1.0.0,<2.0.0
html2text==2016.5.29 html2text==2016.5.29
pillow==3.3.0
pycountry==1.20 pycountry==1.20
python-dateutil==2.5.3 python-dateutil==2.5.3
pytz==2016.4 pytz==2016.4
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment