PLAT-1775 Move help tokens configuration from startup to settings
This commit is contained in:
@@ -133,6 +133,7 @@ from openedx.core.djangoapps.theming.helpers_dirs import (
|
||||
)
|
||||
from openedx.core.lib.license import LicenseMixin
|
||||
from openedx.core.lib.derived import derived, derived_dict_entry
|
||||
from openedx.core.release import doc_version
|
||||
|
||||
############################ FEATURE CONFIGURATION #############################
|
||||
|
||||
@@ -1382,6 +1383,9 @@ AFFILIATE_COOKIE_NAME = 'affiliate_id'
|
||||
############## Settings for Studio Context Sensitive Help ##############
|
||||
|
||||
HELP_TOKENS_INI_FILE = REPO_ROOT / "cms" / "envs" / "help_tokens.ini"
|
||||
HELP_TOKENS_LANGUAGE_CODE = lambda settings: settings.LANGUAGE_CODE
|
||||
HELP_TOKENS_VERSION = lambda settings: doc_version()
|
||||
derived('HELP_TOKENS_LANGUAGE_CODE', 'HELP_TOKENS_VERSION')
|
||||
|
||||
# This is required for the migrations in oauth_dispatch.models
|
||||
# otherwise it fails saying this attribute is not present in Settings
|
||||
|
||||
@@ -15,7 +15,6 @@ from openedx.core.lib.django_startup import autostartup
|
||||
settings.INSTALLED_APPS # pylint: disable=pointless-statement
|
||||
|
||||
from openedx.core.lib.xblock_utils import xblock_local_resource_url
|
||||
from openedx.core.release import doc_version
|
||||
from startup_configurations.validate_config import validate_cms_config
|
||||
|
||||
|
||||
@@ -41,10 +40,6 @@ def run():
|
||||
xmodule.x_module.descriptor_global_handler_url = cms.lib.xblock.runtime.handler_url
|
||||
xmodule.x_module.descriptor_global_local_resource_url = xblock_local_resource_url
|
||||
|
||||
# Set the version of docs that help-tokens will go to.
|
||||
settings.HELP_TOKENS_LANGUAGE_CODE = settings.LANGUAGE_CODE
|
||||
settings.HELP_TOKENS_VERSION = doc_version()
|
||||
|
||||
# validate configurations on startup
|
||||
validate_cms_config(settings)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user