7
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-06-18 13:22:22 +00:00
tutor/tutor/templates/apps/openedx/settings/cms/development.py
David Ormsbee b3cde02330 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.
2023-10-05 09:06:28 +02:00

24 lines
661 B
Python

# -*- coding: utf-8 -*-
import os
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
FEATURES["PREVIEW_LMS_BASE"] = "{{ PREVIEW_LMS_HOST }}:8000"
{% include "apps/openedx/settings/partials/common_cms.py" %}
# Setup correct webpack configuration file for development
WEBPACK_CONFIG_PATH = "webpack.dev.config.js"
{{ patch("openedx-development-settings") }}
{{ patch("openedx-cms-development-settings") }}