From b3cde023303501455fbe3daaca4141ecea61315c Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Wed, 4 Oct 2023 11:49:04 -0400 Subject: [PATCH] fix: override CMS_BASE setting in Studio for dev The LMS was overriding CMS_BASE properly, but Studio (CMS) configuration was not. That meant that Studio's CMS_BASE in dev mode was using the devstack default of localhost:18010 (because this is what's defined in edx-platform). This in turn broke parts of Studio that use this value, such as the XBlock v2 API (/api/xblock/v2). This commit derives the value of the CMS_BASE Django setting from Tutor's CMS_HOST config value, in the same way that the LMS does it. --- changelog.d/20231004_114528_dave_fix_cms_base_settings.md | 1 + tutor/templates/apps/openedx/settings/cms/development.py | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 changelog.d/20231004_114528_dave_fix_cms_base_settings.md diff --git a/changelog.d/20231004_114528_dave_fix_cms_base_settings.md b/changelog.d/20231004_114528_dave_fix_cms_base_settings.md new file mode 100644 index 0000000..c4dcce5 --- /dev/null +++ b/changelog.d/20231004_114528_dave_fix_cms_base_settings.md @@ -0,0 +1 @@ +- [Bugfix] Override CMS_BASE setting in Studio for the development environment. Without this, parts of Studio will try to use the devstack default of localhost:8010 instead. (by @ormsbee) \ No newline at end of file diff --git a/tutor/templates/apps/openedx/settings/cms/development.py b/tutor/templates/apps/openedx/settings/cms/development.py index 5ba365d..af7af18 100644 --- a/tutor/templates/apps/openedx/settings/cms/development.py +++ b/tutor/templates/apps/openedx/settings/cms/development.py @@ -5,6 +5,9 @@ from cms.envs.devstack import * LMS_BASE = "{{ LMS_HOST }}:8000" LMS_ROOT_URL = "http://" + LMS_BASE +CMS_BASE = "{{ CMS_HOST }}:8001" +CMS_ROOT_URL = "http://" + CMS_BASE + # Authentication SOCIAL_AUTH_EDX_OAUTH2_KEY = "{{ CMS_OAUTH2_KEY_SSO_DEV }}" SOCIAL_AUTH_EDX_OAUTH2_PUBLIC_URL_ROOT = LMS_ROOT_URL