Move dark_lang and lang_pref apps to openedx/core
This commit is contained in:
@@ -380,6 +380,7 @@ XQUEUE_WAITTIME_BETWEEN_REQUESTS = 5 # seconds
|
||||
PROJECT_ROOT = path(__file__).abspath().dirname().dirname() # /edx-platform/lms
|
||||
REPO_ROOT = PROJECT_ROOT.dirname()
|
||||
COMMON_ROOT = REPO_ROOT / "common"
|
||||
OPENEDX_ROOT = REPO_ROOT / "openedx"
|
||||
ENV_ROOT = REPO_ROOT.dirname() # virtualenv dir /edx-platform is in
|
||||
COURSES_ROOT = ENV_ROOT / "data"
|
||||
|
||||
@@ -460,10 +461,13 @@ OAUTH2_PROVIDER = {
|
||||
import tempfile
|
||||
MAKO_MODULE_DIR = os.path.join(tempfile.gettempdir(), 'mako_lms')
|
||||
MAKO_TEMPLATES = {}
|
||||
MAKO_TEMPLATES['main'] = [PROJECT_ROOT / 'templates',
|
||||
COMMON_ROOT / 'templates',
|
||||
COMMON_ROOT / 'lib' / 'capa' / 'capa' / 'templates',
|
||||
COMMON_ROOT / 'djangoapps' / 'pipeline_mako' / 'templates']
|
||||
MAKO_TEMPLATES['main'] = [
|
||||
PROJECT_ROOT / 'templates',
|
||||
COMMON_ROOT / 'templates',
|
||||
COMMON_ROOT / 'lib' / 'capa' / 'capa' / 'templates',
|
||||
COMMON_ROOT / 'djangoapps' / 'pipeline_mako' / 'templates',
|
||||
OPENEDX_ROOT / 'core' / 'djangoapps' / 'dark_lang' / 'templates',
|
||||
]
|
||||
|
||||
# Django templating
|
||||
TEMPLATES = [
|
||||
@@ -1131,12 +1135,12 @@ MIDDLEWARE_CLASSES = (
|
||||
'embargo.middleware.EmbargoMiddleware',
|
||||
|
||||
# Allows us to set user preferences
|
||||
'lang_pref.middleware.LanguagePreferenceMiddleware',
|
||||
'openedx.core.djangoapps.lang_pref.middleware.LanguagePreferenceMiddleware',
|
||||
|
||||
# Allows us to dark-launch particular languages.
|
||||
# Must be after LangPrefMiddleware, so ?preview-lang query params can override
|
||||
# user's language preference. ?clear-lang resets to user's language preference.
|
||||
'dark_lang.middleware.DarkLangMiddleware',
|
||||
'openedx.core.djangoapps.dark_lang.middleware.DarkLangMiddleware',
|
||||
|
||||
# Detects user-requested locale from 'accept-language' header in http request.
|
||||
# Must be after DarkLangMiddleware.
|
||||
@@ -2014,7 +2018,7 @@ INSTALLED_APPS = (
|
||||
'lms.djangoapps.verify_student',
|
||||
|
||||
# Dark-launching languages
|
||||
'dark_lang',
|
||||
'openedx.core.djangoapps.dark_lang',
|
||||
|
||||
# Microsite configuration
|
||||
'microsite_configuration',
|
||||
|
||||
Reference in New Issue
Block a user