Newer
Older
"""
This is the common settings file, intended to set sane defaults. If you have a
piece of configuration that's dependent on a set of feature flags being set,
then create a function that returns the calculated value based on the value of
FEATURES[...]. Modules that extend this one can change the feature
configuration in an environment specific config file and re-calculate those
values.
We should make a method that calls all these config methods so that you just
make one call at the end of your site-specific dev file to reset all the
dependent variables (like INSTALLED_APPS) for you.
1. Right now our treatment of static content in general and in particular
course-specific static content is haphazard.
2. We should have a more disciplined approach to feature flagging, even if it
just means that we stick them in a dict called FEATURES.
3. We need to handle configuration for multiple courses. This could be as
multiple sites, but we do need a way to map their data assets.
"""
Calen Pennington
committed
# We intentionally define lots of variables that aren't used
# pylint: disable=unused-import
Calen Pennington
committed
# Pylint gets confused by path.py instances, which report themselves as class
# objects. As a result, pylint applies the wrong regex in validating names,
# and throws spurious errors. Therefore, we disable invalid-name checking.
from corsheaders.defaults import default_headers as corsheaders_default_headers
from path import Path as path
from django.utils.translation import ugettext_lazy as _
from enterprise.constants import (
ENTERPRISE_ADMIN_ROLE,
ENTERPRISE_CATALOG_ADMIN_ROLE,
Amit
committed
ENTERPRISE_DASHBOARD_ADMIN_ROLE,
ENTERPRISE_ENROLLMENT_API_ADMIN_ROLE,
ENTERPRISE_REPORTING_CONFIG_ADMIN_ROLE,
ENTERPRISE_OPERATOR_ROLE
David Ormsbee
committed
from openedx.core.constants import COURSE_KEY_REGEX, COURSE_KEY_PATTERN, COURSE_ID_PATTERN
from openedx.core.djangoapps.theming.helpers_dirs import (
get_themes_unchecked,
get_theme_base_dirs_from_settings
)
from openedx.core.lib.derived import derived, derived_collection_entry
from openedx.core.release import doc_version
from lms.djangoapps.lms_xblock.mixin import LmsBlockMixin
################################### FEATURES ###################################
# .. setting_name: PLATFORM_NAME
# .. setting_default: Your Platform Name Here
# .. setting_description: The display name of the platform to be used in
# templates/emails/etc.
PLATFORM_NAME = _('Your Platform Name Here')
PLATFORM_DESCRIPTION = _('Your Platform Description Here')
PLATFORM_FACEBOOK_ACCOUNT = "http://www.facebook.com/YourPlatformFacebookAccount"
PLATFORM_TWITTER_ACCOUNT = "@YourPlatformTwitterAccount"
Calen Pennington
committed
ENABLE_JASMINE = False
Calen Pennington
committed
LMS_ENROLLMENT_API_PATH = "/api/enrollment/v1/"
# List of logout URIs for each IDA that the learner should be logged out of when they logout of the LMS. Only applies to
# IDA for which the social auth flow uses DOT (Django OAuth Toolkit).
IDA_LOGOUT_URI_LIST = []
# .. toggle_name: FEATURES['DISPLAY_DEBUG_INFO_TO_STAFF']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Add a "Staff Debug" button to course modules for debugging
# by course staff.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-09-04
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/2425
'DISPLAY_DEBUG_INFO_TO_STAFF': True,
# .. toggle_name: FEATURES['DISPLAY_HISTOGRAMS_TO_STAFF']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: This displays histograms in the Staff Debug Info panel to course staff.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-02-13
# .. toggle_warnings: Generating histograms requires scanning the courseware_studentmodule table on each view. This
# can make staff access to courseware very slow on large courses.
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/2425
Usman Khalid
committed
'DISPLAY_HISTOGRAMS_TO_STAFF': False, # For large courses this slows down courseware access for staff.
'REROUTE_ACTIVATION_EMAIL': False, # nonempty string = address for all activation emails
# .. toggle_name: FEATURES['DISABLE_START_DATES']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When True, all courses will be active, regardless of start
# date.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2012-07-24
# .. toggle_warnings: This will cause ALL courses to be immediately visible.
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/17913
## DO NOT SET TO True IN THIS FILE
## Doing so will cause all courses to be released on production
'DISABLE_START_DATES': False,
# .. toggle_name: FEATURES['ENABLE_DISCUSSION_SERVICE']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: When True, it will enable the Discussion tab in courseware for all courses. Setting this
# to False will not contain inline discussion components and discussion tab in any courses.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2012-08-14
# .. toggle_warnings: If the discussion panel is present in the course and the value for this flag is False then,
# attempting to expand those components will cause errors. So, this should only be set to False with an LMS that
# is running courses that do not contain discussion components.
# For consistency in user-experience, keep the value in sync with the setting of the same name in the CMS.
'ENABLE_DISCUSSION_SERVICE': True,
# .. toggle_name: FEATURES['ENABLE_TEXTBOOK']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Add PDF and HTML textbook tabs to the courseware.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-03-27
# .. toggle_warnings: For consistency in user-experience, keep the value in sync with the setting of the same name
# in the CMS.
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/3064
# .. toggle_name: FEATURES['ENABLE_DISCUSSION_HOME_PANEL']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Hides or displays a welcome panel under the Discussion tab, which includes a subscription
# on/off setting for discussion digest emails.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-07-30
# .. toggle_warnings: This should remain off in production until digest notifications are online.
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/520
# .. toggle_name: FEATURES['ENABLE_DISCUSSION_EMAIL_DIGEST']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set this to True if you want the discussion digest emails
# enabled automatically for new users. This will be set on all new account
# registrations.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-08-19
# .. toggle_target_removal_date: None
# .. toggle_warnings: It is not recommended to enable this feature if ENABLE_DISCUSSION_HOME_PANEL is not enabled,
# since subscribers who receive digests in that case will only be able to unsubscribe via links embedded in
# their emails, and they will have no way to resubscribe.
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/4891
Alan Boudreault
committed
'ENABLE_DISCUSSION_EMAIL_DIGEST': False,
# .. toggle_name: FEATURES['ENABLE_UNICODE_USERNAME']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set this to True to allow unicode characters in username. Enabling this will also
# automatically enable SOCIAL_AUTH_CLEAN_USERNAMES. When this is enabled, usernames will have to match the
# regular expression defined by USERNAME_REGEX_PARTIAL.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2017-06-27
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/14729
'ENABLE_UNICODE_USERNAME': False,
# .. toggle_name: FEATURES['ENABLE_DJANGO_ADMIN_SITE']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Set to False if you want to disable Django's admin site.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-09-26
# .. toggle_warnings: It is not recommended to disable this feature as there are many settings available on
# Django's admin site and will be inaccessible to the superuser.
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/829
'ENABLE_DJANGO_ADMIN_SITE': True,
'ENABLE_LMS_MIGRATION': False,
# .. toggle_name: FEATURES['ENABLE_MASQUERADE']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-04-13
'ENABLE_MASQUERADE': True,
# .. toggle_name: FEATURES['DISABLE_LOGIN_BUTTON']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Removes the display of the login button in the navigation bar.
Loading full blame...