Skip to content

Merge LMS/CMS settings with partially overlapping values by using Derived values #37280

Closed

Description

@wgu-taylor-payne

Find settings defined in lms/envs/common.py and cms/envs/common.py with overlapping, but not equal, values. Where possible, bring these settings up into openedx/envs/common.py where the value is defined with both the overlapping part, and then the non-overlapping part becomes based on values from settings in {lms/cms}/envs/common.py. This is accomplished by using a Derived value.

For example, we currently have HELP_TOKENS_INI_FILE defined like so in the common.py files:

# lms/envs/common.py
HELP_TOKENS_INI_FILE = REPO_ROOT / "lms" / "envs" / "help_tokens.ini"

# cms/envs/common.py
HELP_TOKENS_INI_FILE = REPO_ROOT / "cms" / "envs" / "help_tokens.ini"

If possible, we bring up HELP_TOKENS_INI_FILE into openedx/envs/common.py as a Derived setting that depends on the final value of REPO_ROOT and some other variable that holds the application name (i.e. "lms" or "cms"), such as SERVICE_VARIANT.

Activity

  1. wgu-taylor-payne commented on Sep 11, 2025

    @wgu-taylor-payne
    ContributorAuthor

    As part of this work, look to change MAKO_TEMPLATE_DIRS_BASE to a Derived setting if possible, making it possible to remove the lms.envs.common dependency from cms/envs/common.py. If we cannot accomplish this via a Derived setting, create a ticket to refactor this in some other way that allows us to remove the lms.envs.common dependency.

    Relevant discussion can be found here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions