refactor: flatten FEATURES dictionary with backward compatible proxy
This commit is contained in:
committed by
Ram Chandra Bhavirisetty
parent
298bbcb8d2
commit
790a67a0d1
@@ -142,31 +142,31 @@ PIPELINE['SASS_ARGUMENTS'] = '--debug-info'
|
||||
|
||||
########################### VERIFIED CERTIFICATES #################################
|
||||
|
||||
FEATURES['AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING'] = True
|
||||
AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING = True
|
||||
|
||||
########################### External REST APIs #################################
|
||||
FEATURES['ENABLE_OAUTH2_PROVIDER'] = True
|
||||
FEATURES['ENABLE_MOBILE_REST_API'] = True
|
||||
FEATURES['ENABLE_VIDEO_ABSTRACTION_LAYER_API'] = True
|
||||
ENABLE_OAUTH2_PROVIDER = True
|
||||
ENABLE_MOBILE_REST_API = True
|
||||
ENABLE_VIDEO_ABSTRACTION_LAYER_API = True
|
||||
|
||||
########################## SECURITY #######################
|
||||
FEATURES['ENABLE_MAX_FAILED_LOGIN_ATTEMPTS'] = False
|
||||
FEATURES['SQUELCH_PII_IN_LOGS'] = False
|
||||
FEATURES['PREVENT_CONCURRENT_LOGINS'] = False
|
||||
ENABLE_MAX_FAILED_LOGIN_ATTEMPTS = False
|
||||
SQUELCH_PII_IN_LOGS = False
|
||||
PREVENT_CONCURRENT_LOGINS = False
|
||||
|
||||
########################### Milestones #################################
|
||||
FEATURES['MILESTONES_APP'] = True
|
||||
MILESTONES_APP = True
|
||||
|
||||
########################### Entrance Exams #################################
|
||||
FEATURES['ENTRANCE_EXAMS'] = True
|
||||
ENTRANCE_EXAMS = True
|
||||
|
||||
################################ COURSE LICENSES ################################
|
||||
FEATURES['LICENSING'] = True
|
||||
LICENSING = True
|
||||
|
||||
|
||||
########################## Courseware Search #######################
|
||||
FEATURES['ENABLE_COURSEWARE_SEARCH'] = True
|
||||
FEATURES['ENABLE_COURSEWARE_SEARCH_FOR_COURSE_STAFF'] = True
|
||||
ENABLE_COURSEWARE_SEARCH = True
|
||||
ENABLE_COURSEWARE_SEARCH_FOR_COURSE_STAFF = True
|
||||
SEARCH_ENGINE = 'search.elastic.ElasticSearchEngine'
|
||||
SEARCH_COURSEWARE_CONTENT_LOG_PARAMS = True
|
||||
|
||||
@@ -179,11 +179,11 @@ ELASTIC_SEARCH_CONFIG = [
|
||||
]
|
||||
|
||||
########################## Dashboard Search #######################
|
||||
FEATURES['ENABLE_DASHBOARD_SEARCH'] = False
|
||||
ENABLE_DASHBOARD_SEARCH = False
|
||||
|
||||
|
||||
########################## Certificates Web/HTML View #######################
|
||||
FEATURES['CERTIFICATES_HTML_VIEW'] = True
|
||||
CERTIFICATES_HTML_VIEW = True
|
||||
|
||||
|
||||
########################## Course Discovery #######################
|
||||
@@ -205,14 +205,14 @@ COURSE_DISCOVERY_MEANINGS = {
|
||||
'language': LANGUAGE_MAP,
|
||||
}
|
||||
|
||||
FEATURES['ENABLE_COURSE_DISCOVERY'] = False
|
||||
ENABLE_COURSE_DISCOVERY = False
|
||||
# Setting for overriding default filtering facets for Course discovery
|
||||
# COURSE_DISCOVERY_FILTERS = ["org", "language", "modes"]
|
||||
FEATURES['COURSES_ARE_BROWSEABLE'] = True
|
||||
COURSES_ARE_BROWSEABLE = True
|
||||
HOMEPAGE_COURSE_MAX = 9
|
||||
|
||||
# Software secure fake page feature flag
|
||||
FEATURES['ENABLE_SOFTWARE_SECURE_FAKE'] = True
|
||||
ENABLE_SOFTWARE_SECURE_FAKE = True
|
||||
|
||||
# Setting for the testing of Software Secure Result Callback
|
||||
VERIFY_STUDENT["SOFTWARE_SECURE"] = {
|
||||
@@ -226,14 +226,14 @@ SEARCH_SKIP_ENROLLMENT_START_DATE_FILTERING = True
|
||||
|
||||
|
||||
########################## Shopping cart ##########################
|
||||
FEATURES['ENABLE_COSMETIC_DISPLAY_PRICE'] = True
|
||||
ENABLE_COSMETIC_DISPLAY_PRICE = True
|
||||
|
||||
######################### Program Enrollments #####################
|
||||
FEATURES['ENABLE_ENROLLMENT_RESET'] = True
|
||||
ENABLE_ENROLLMENT_RESET = True
|
||||
|
||||
########################## Third Party Auth #######################
|
||||
|
||||
if FEATURES.get('ENABLE_THIRD_PARTY_AUTH') and (
|
||||
if ENABLE_THIRD_PARTY_AUTH and (
|
||||
'common.djangoapps.third_party_auth.dummy.DummyBackend' not in AUTHENTICATION_BACKENDS
|
||||
):
|
||||
AUTHENTICATION_BACKENDS = ['common.djangoapps.third_party_auth.dummy.DummyBackend'] + list(AUTHENTICATION_BACKENDS)
|
||||
@@ -293,7 +293,7 @@ LEARNING_MICROFRONTEND_URL = os.environ.get("LEARNING_MICROFRONTEND_URL", "http:
|
||||
LEARNING_MICROFRONTEND_NETLOC = os.environ.get("LEARNING_MICROFRONTEND_NETLOC", urlparse(LEARNING_MICROFRONTEND_URL).netloc)
|
||||
|
||||
###################### Cross-domain requests ######################
|
||||
FEATURES['ENABLE_CORS_HEADERS'] = True
|
||||
ENABLE_CORS_HEADERS = True
|
||||
CORS_ALLOW_CREDENTIALS = True
|
||||
CORS_ORIGIN_WHITELIST = ()
|
||||
CORS_ORIGIN_ALLOW_ALL = True
|
||||
@@ -407,17 +407,15 @@ DISCUSSION_SPAM_URLS = []
|
||||
|
||||
############## Docker based devstack settings #######################
|
||||
|
||||
FEATURES.update({
|
||||
'AUTOMATIC_AUTH_FOR_TESTING': True,
|
||||
'ENABLE_DISCUSSION_SERVICE': True,
|
||||
'SHOW_HEADER_LANGUAGE_SELECTOR': True,
|
||||
AUTOMATIC_AUTH_FOR_TESTING = True
|
||||
ENABLE_DISCUSSION_SERVICE = True
|
||||
SHOW_HEADER_LANGUAGE_SELECTOR = True
|
||||
|
||||
# Enable enterprise integration by default.
|
||||
# See https://github.com/openedx/edx-enterprise/blob/master/docs/development.rst for
|
||||
# more background on edx-enterprise.
|
||||
# Toggle this off if you don't want anything to do with enterprise in devstack.
|
||||
'ENABLE_ENTERPRISE_INTEGRATION': True,
|
||||
})
|
||||
# Enable enterprise integration by default.
|
||||
# See https://github.com/openedx/edx-enterprise/blob/master/docs/development.rst for
|
||||
# more background on edx-enterprise.
|
||||
# Toggle this off if you don't want anything to do with enterprise in devstack.
|
||||
ENABLE_ENTERPRISE_INTEGRATION = True
|
||||
|
||||
ENABLE_MKTG_SITE = os.environ.get('ENABLE_MARKETING_SITE', False)
|
||||
MARKETING_SITE_ROOT = os.environ.get('MARKETING_SITE_ROOT', 'http://localhost:8080')
|
||||
@@ -463,7 +461,7 @@ SYSTEM_WIDE_ROLE_CLASSES.append(
|
||||
'system_wide_roles.SystemWideRoleAssignment',
|
||||
)
|
||||
|
||||
if FEATURES.get('ENABLE_ENTERPRISE_INTEGRATION'):
|
||||
if ENABLE_ENTERPRISE_INTEGRATION:
|
||||
SYSTEM_WIDE_ROLE_CLASSES.append(
|
||||
'enterprise.SystemWideEnterpriseUserRoleAssignment',
|
||||
)
|
||||
@@ -498,8 +496,8 @@ DCS_SESSION_COOKIE_SAMESITE_FORCE_ALL = True
|
||||
# LOGGING['loggers']['django.db.backends'] = {'handlers': ['console'], 'level': 'DEBUG', 'propagate': False}
|
||||
|
||||
################### Special Exams (Proctoring) and Prereqs ###################
|
||||
FEATURES['ENABLE_SPECIAL_EXAMS'] = True
|
||||
FEATURES['ENABLE_PREREQUISITE_COURSES'] = True
|
||||
ENABLE_SPECIAL_EXAMS = True
|
||||
ENABLE_PREREQUISITE_COURSES = True
|
||||
|
||||
# Used in edx-proctoring for ID generation in lieu of SECRET_KEY - dummy value
|
||||
# (ref MST-637)
|
||||
|
||||
Reference in New Issue
Block a user