Newer
Older
'splash.middleware.SplashMiddleware',
'openedx.core.djangoapps.geoinfo.middleware.CountryMiddleware',
'openedx.core.djangoapps.embargo.middleware.EmbargoMiddleware',
# Allows us to use enterprise customer's language as the learner's default language
# This middleware must come before `LanguagePreferenceMiddleware` middleware
'enterprise.middleware.EnterpriseLanguagePreferenceMiddleware',
'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.
'openedx.core.djangoapps.dark_lang.middleware.DarkLangMiddleware',
# Detects user-requested locale from 'accept-language' header in http request.
# Must be after DarkLangMiddleware.
'django.middleware.locale.LocaleMiddleware',
'lms.djangoapps.discussion.django_comment_client.utils.ViewNameMiddleware',
'codejail.django_integration.ConfigureCodeJailMiddleware',
# catches any uncaught RateLimitExceptions and returns a 403 instead of a 500
'ratelimitbackend.middleware.RateLimitMiddleware',
David Ormsbee
committed
# for expiring inactive sessions
'openedx.core.djangoapps.session_inactivity_timeout.middleware.SessionInactivityTimeout',
# use Django built in clickjacking protection
'django.middleware.clickjacking.XFrameOptionsMiddleware',
Adam Palay
committed
# to redirected unenrolled students to the course info page
'lms.djangoapps.courseware.middleware.CacheCourseIdMiddleware',
'lms.djangoapps.courseware.middleware.RedirectMiddleware',
Adam Palay
committed
'lms.djangoapps.course_wiki.middleware.WikiAccessMiddleware',
'openedx.core.djangoapps.theming.middleware.CurrentSiteThemeMiddleware',
# Enables force_django_cache_miss functionality for TieredCache.
'edx_django_utils.cache.middleware.TieredCacheMiddleware',
# Adds monitoring attributes to requests.
'edx_rest_framework_extensions.middleware.RequestCustomAttributesMiddleware',
'edx_rest_framework_extensions.auth.jwt.middleware.EnsureJWTAuthSettingsMiddleware',
# Handles automatically storing user ids in django-simple-history tables when possible.
'simple_history.middleware.HistoryRequestMiddleware',
'openedx.core.djangoapps.site_configuration.middleware.SessionCookieDomainOverrideMiddleware',
Jesse Shapiro
committed
]
# Clickjacking protection can be disbaled by setting this to 'ALLOW'
X_FRAME_OPTIONS = 'DENY'
Dmitry Viskov
committed
# Platform for Privacy Preferences header
P3P_HEADER = 'CP="Open EdX does not have a P3P policy."'
############################### PIPELINE #######################################
PIPELINE = {
'PIPELINE_ENABLED': True,
'CSS_COMPRESSOR': None,
'JS_COMPRESSOR': 'pipeline.compressors.uglifyjs.UglifyJSCompressor',
# Don't wrap JavaScript as there is code that depends upon updating the global namespace
'DISABLE_WRAPPER': True,
# Specify the UglifyJS binary to use
'UGLIFYJS_BINARY': 'node_modules/.bin/uglifyjs',
}
STATICFILES_STORAGE = 'openedx.core.storage.ProductionStorage'
Calen Pennington
committed
STATICFILES_STORAGE_KWARGS = {}
# List of finder classes that know how to find static files in various locations.
# Note: the pipeline finder is included to be able to discover optimized files
STATICFILES_FINDERS = [
'openedx.core.djangoapps.theming.finders.ThemeFilesFinder',
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'openedx.core.lib.xblock_pipeline.finder.XBlockPipelineFinder',
'pipeline.finders.PipelineFinder',
]
from openedx.core.lib.rooted_paths import rooted_glob # pylint: disable=wrong-import-position
Bridger Maxwell
committed
courseware_js = [
'js/ajax-error.js',
'js/courseware.js',
'js/histogram.js',
'js/navigation.js',
'js/modules/tab.js',
]
# Before a student accesses courseware, we do not
# need many of the JS dependencies. This includes
# only the dependencies used everywhere in the LMS
# (including the dashboard/account/profile pages)
# Currently, this partially duplicates the "main vendor"
# JavaScript file, so only one of the two should be included
# on a page at any time.
# In the future, we will likely refactor this to use
# RequireJS and an optimizer.
base_vendor_js = [
'common/js/vendor/jquery.js',
'common/js/vendor/jquery-migrate.js',
'js/vendor/jquery.cookie.js',
'js/vendor/url.min.js',
'common/js/vendor/underscore.js',
'common/js/vendor/underscore.string.js',
'common/js/vendor/picturefill.js',
# Make some edX UI Toolkit utilities available in the global "edx" namespace
'edx-ui-toolkit/js/utils/global-loader.js',
'edx-ui-toolkit/js/utils/string-utils.js',
'edx-ui-toolkit/js/utils/html-utils.js',
# Finally load RequireJS and dependent vendor libraries
'js/RequireJS-namespace-undefine.js',
]
main_vendor_js = base_vendor_js + [
'js/vendor/json2.js',
'js/vendor/jquery-ui.min.js',
'js/vendor/jquery.qtip.min.js',
'js/vendor/jquery.ba-bbq.min.js',
]
# Common files used by both RequireJS code and non-RequireJS code
base_application_js = [
'js/src/utility.js',
'js/src/logger.js',
'js/user_dropdown_v1.js', # Custom dropdown keyboard handling for legacy pages
'js/dialog_tab_controls.js',
'js/src/string_utils.js',
'js/form.ext.js',
'js/src/ie_shim.js',
'js/src/accessibility_tools.js',
'js/toggle_login_modal.js',
Bridger Maxwell
committed
sorted(rooted_glob(PROJECT_ROOT / 'static', 'js/dashboard/**/*.js'))
rooted_glob(PROJECT_ROOT / 'static', 'js/customwmd.js') +
rooted_glob(PROJECT_ROOT / 'static', 'js/mathjax_accessible.js') +
rooted_glob(PROJECT_ROOT / 'static', 'js/mathjax_delay_renderer.js') +
sorted(rooted_glob(COMMON_ROOT / 'static', 'common/js/discussion/**/*.js'))
discussion_vendor_js = [
'js/Markdown.Converter.js',
'js/Markdown.Sanitizer.js',
'js/Markdown.Editor.js',
'js/vendor/jquery.timeago.js',
'js/src/jquery.timeago.locale.js',
'js/vendor/jquery.truncate.js',
'js/jquery.ajaxfileupload.js',
'js/split.js'
]
alisan617
committed
instructor_dash_js = sorted(rooted_glob(PROJECT_ROOT / 'static', 'js/instructor_dashboard/**/*.js'))
verify_student_js = [
'js/sticky_filter.js',
'js/query-params.js',
'js/verify_student/models/verification_model.js',
'js/verify_student/views/error_view.js',
'js/verify_student/views/image_input_view.js',
'js/verify_student/views/webcam_photo_view.js',
'js/verify_student/views/step_view.js',
'js/verify_student/views/intro_step_view.js',
'js/verify_student/views/make_payment_step_view.js',
'js/verify_student/views/face_photo_step_view.js',
'js/verify_student/views/id_photo_step_view.js',
'js/verify_student/views/review_photos_step_view.js',
'js/verify_student/views/enrollment_confirmation_step_view.js',
'js/verify_student/views/pay_and_verify_view.js',
'js/verify_student/pay_and_verify.js',
]
'js/verify_student/views/error_view.js',
'js/verify_student/views/image_input_view.js',
'js/verify_student/views/webcam_photo_view.js',
'js/verify_student/views/step_view.js',
'js/verify_student/views/face_photo_step_view.js',
'js/verify_student/views/id_photo_step_view.js',
'js/verify_student/views/review_photos_step_view.js',
'js/verify_student/views/reverify_success_step_view.js',
'js/verify_student/models/verification_model.js',
'js/verify_student/views/reverify_view.js',
'js/verify_student/reverify.js',
]
incourse_reverify_js = [
'js/verify_student/views/error_view.js',
'js/verify_student/views/image_input_view.js',
'js/verify_student/views/webcam_photo_view.js',
'js/verify_student/models/verification_model.js',
'js/verify_student/views/incourse_reverify_view.js',
'js/verify_student/incourse_reverify.js',
]
ccx_js = sorted(rooted_glob(PROJECT_ROOT / 'static', 'js/ccx/**/*.js'))
'common/js/vendor/jquery.js',
'common/js/vendor/jquery-migrate.js',
'js/vendor/jquery.cookie.js',
'js/src/logger.js',
'js/utils/facebook.js',
credit_web_view_js = [
'common/js/vendor/jquery.js',
'common/js/vendor/jquery-migrate.js',
'js/vendor/jquery.cookie.js',
'js/src/logger.js',
]
Brian Talbot
committed
'style-vendor': {
'source_filenames': [
'css/vendor/font-awesome.css',
'css/vendor/jquery.qtip.min.css',
],
'output_filename': 'css/lms-style-vendor.css',
'style-vendor-tinymce-content': {
'source_filenames': [
'js/vendor/tinymce/js/tinymce/skins/studio-tmce4/content.min.css'
],
'output_filename': 'css/lms-style-vendor-tinymce-content.css',
},
'style-vendor-tinymce-skin': {
'source_filenames': [
'js/vendor/tinymce/js/tinymce/skins/studio-tmce4/skin.min.css'
],
'output_filename': 'css/lms-style-vendor-tinymce-skin.css',
},
'css/lms-main-v1.css',
'output_filename': 'css/lms-main-v1.css',
'style-main-v1-rtl': {
'css/lms-main-v1-rtl.css',
'output_filename': 'css/lms-main-v1-rtl.css',
},
Brian Talbot
committed
'style-course-vendor': {
'source_filenames': [
'js/vendor/CodeMirror/codemirror.css',
'css/vendor/jquery.treeview.css',
'css/vendor/ui-lightness/jquery-ui-1.8.22.custom.css',
Brian Talbot
committed
],
'output_filename': 'css/lms-style-course-vendor.css',
},
'style-course': {
'source_filenames': [
'output_filename': 'css/lms-course.css',
'style-course-rtl': {
'source_filenames': [
'css/lms-course-rtl.css',
'output_filename': 'css/lms-course-rtl.css',
},
'style-student-notes': {
'source_filenames': [
'css/vendor/edxnotes/annotator.min.css',
],
'output_filename': 'css/lms-style-student-notes.css',
'style-inline-discussion': {
'source_filenames': [
'css/discussion/inline-discussion.css',
],
'output_filename': 'css/discussion/inline-discussion.css',
},
'style-inline-discussion-rtl': {
'source_filenames': [
'css/discussion/inline-discussion-rtl.css',
],
'output_filename': 'css/discussion/inline-discussion-rtl.css',
},
AlasdairSwan
committed
'source_filenames': [
'css/lms-footer.css',
AlasdairSwan
committed
],
AlasdairSwan
committed
},
AlasdairSwan
committed
'source_filenames': [
'css/lms-footer-rtl.css',
AlasdairSwan
committed
],
'output_filename': 'css/lms-footer-rtl.css'
},
FOOTER_CSS['edx']['ltr']: {
'source_filenames': [
'css/lms-footer-edx.css',
],
'output_filename': 'css/lms-footer-edx.css'
},
FOOTER_CSS['edx']['rtl']: {
'source_filenames': [
'css/lms-footer-edx-rtl.css',
],
'output_filename': 'css/lms-footer-edx-rtl.css'
AlasdairSwan
committed
},
'style-certificates': {
'source_filenames': [
'certificates/css/main-ltr.css',
'css/vendor/font-awesome.css',
],
'output_filename': 'css/certificates-style.css'
},
'style-certificates-rtl': {
'source_filenames': [
'certificates/css/main-rtl.css',
'css/vendor/font-awesome.css',
],
'output_filename': 'css/certificates-style-rtl.css'
},
'style-mobile': {
'source_filenames': [
'css/lms-mobile.css',
],
'output_filename': 'css/lms-mobile.css',
},
'style-mobile-rtl': {
'source_filenames': [
'css/lms-mobile-rtl.css',
],
'output_filename': 'css/lms-mobile-rtl.css',
},
common_js = [
'js/src/ajax_prefix.js',
'js/src/jquery.immediateDescendents.js',
'js/src/xproblem.js',
]
xblock_runtime_js = [
'common/js/xblock/core.js',
'common/js/xblock/runtime.v1.js',
'lms/js/xblock/lms.runtime.v1.js',
]
lms_application_js = [
'js/calculator.js',
'js/feedback_form.js',
'js/main.js',
]
'base_application': {
'source_filenames': base_application_js,
'output_filename': 'js/lms-base-application.js',
},
Calen Pennington
committed
'application': {
'source_filenames': (
common_js + xblock_runtime_js + base_application_js + lms_application_js +
[
'js/sticky_filter.js',
'js/query-params.js',
'common/js/vendor/moment-with-locales.js',
'output_filename': 'js/lms-application.js',
Calen Pennington
committed
'source_filenames': courseware_js,
'output_filename': 'js/lms-courseware.js',
},
'base_vendor': {
'source_filenames': base_vendor_js,
'output_filename': 'js/lms-base-vendor.js',
Bridger Maxwell
committed
},
'main_vendor': {
'source_filenames': main_vendor_js,
Calen Pennington
committed
'output_filename': 'js/lms-main_vendor.js',
'module-descriptor-js': {
'source_filenames': rooted_glob(COMMON_ROOT / 'static/', 'xmodule/descriptors/js/*.js'),
'output_filename': 'js/lms-module-descriptors.js',
},
Calen Pennington
committed
'module-js': {
'source_filenames': rooted_glob(COMMON_ROOT / 'static', 'xmodule/modules/js/*.js'),
Calen Pennington
committed
'output_filename': 'js/lms-modules.js',
Calen Pennington
committed
},
Calen Pennington
committed
'discussion': {
'source_filenames': discussion_js,
'output_filename': 'js/discussion.js',
'discussion_vendor': {
'source_filenames': discussion_vendor_js,
'output_filename': 'js/discussion_vendor.js',
},
'instructor_dash': {
'source_filenames': instructor_dash_js,
'output_filename': 'js/instructor_dash.js',
'dashboard': {
'source_filenames': dashboard_js,
'output_filename': 'js/dashboard.js'
},
'verify_student': {
'source_filenames': verify_student_js,
'output_filename': 'js/verify_student.js'
},
'reverify': {
'source_filenames': reverify_js,
'output_filename': 'js/reverify.js'
},
'incourse_reverify': {
'source_filenames': incourse_reverify_js,
'output_filename': 'js/incourse_reverify.js'
'ccx': {
'source_filenames': ccx_js,
'output_filename': 'js/ccx.js'
AlasdairSwan
committed
},
'footer_edx': {
'output_filename': 'js/footer-edx.js'
},
'certificates_wv': {
'source_filenames': certificates_web_view_js,
'output_filename': 'js/certificates/web_view.js'
Braden MacDonald
committed
},
'credit_wv': {
'source_filenames': credit_web_view_js,
'output_filename': 'js/credit/web_view.js'
Calen Pennington
committed
}
STATICFILES_IGNORE_PATTERNS = (
"*.py",
"*.pyc",
# It would be nice if we could do, for example, "**/*.scss",
# but these strings get passed down to the `fnmatch` module,
# which doesn't support that. :(
# http://docs.python.org/2/library/fnmatch.html
"sass/*.scss",
"sass/*/*.scss",
"sass/*/*/*.scss",
"sass/*/*/*/*.scss",
# Ignore tests
"spec",
"spec_helpers",
# Symlinks used by js-test-tool
"xmodule_js",
################################# DJANGO-REQUIRE ###############################
# The baseUrl to pass to the r.js optimizer, relative to STATIC_ROOT.
REQUIRE_BASE_URL = "./"
# The name of a build profile to use for your project, relative to REQUIRE_BASE_URL.
# A sensible value would be 'app.build.js'. Leave blank to use the built-in default build profile.
# Set to False to disable running the default profile (e.g. if only using it to build Standalone
# Modules)
REQUIRE_BUILD_PROFILE = "lms/js/build.js"
# The name of the require.js script used by your project, relative to REQUIRE_BASE_URL.
REQUIRE_JS = "common/js/vendor/require.js"
# Whether to run django-require in debug mode.
REQUIRE_DEBUG = False
# In production, the Django pipeline appends a file hash to JavaScript file names.
# This makes it difficult for RequireJS to load its requirements, since module names
# specified in JavaScript code do not include the hash.
# For this reason, we calculate the actual path including the hash on the server
# when rendering the page. We then override the default paths provided to RequireJS
# so it can resolve the module name to the correct URL.
#
# If you want to load JavaScript dependencies using RequireJS
# but you don't want to include those dependencies in the JS bundle for the page,
# then you need to add the js urls in this list.
REQUIRE_JS_PATH_OVERRIDES = {
'course_bookmarks/js/views/bookmark_button': 'course_bookmarks/js/views/bookmark_button.js',
'js/views/message_banner': 'js/views/message_banner.js',
'moment': 'common/js/vendor/moment-with-locales.js',
'moment-timezone': 'common/js/vendor/moment-timezone-with-data.js',
'js/courseware/course_info_events': 'js/courseware/course_info_events.js',
'js/courseware/accordion_events': 'js/courseware/accordion_events.js',
'js/dateutil_factory': 'js/dateutil_factory.js',
'js/courseware/link_clicked_events': 'js/courseware/link_clicked_events.js',
'js/courseware/toggle_element_visibility': 'js/courseware/toggle_element_visibility.js',
'js/student_account/logistration_factory': 'js/student_account/logistration_factory.js',
'js/courseware/courseware_factory': 'js/courseware/courseware_factory.js',
'js/groups/views/cohorts_dashboard_factory': 'js/groups/views/cohorts_dashboard_factory.js',
'js/groups/discussions_management/discussions_dashboard_factory':
'js/discussions_management/views/discussions_dashboard_factory.js',
'draggabilly': 'js/vendor/draggabilly.js',
'hls': 'common/js/vendor/hls.js'
}
########################## DJANGO WEBPACK LOADER ##############################
WEBPACK_LOADER = {
'DEFAULT': {
'BUNDLE_DIR_NAME': 'bundles/',
'STATS_FILE': os.path.join(STATIC_ROOT, 'webpack-stats.json')
},
'WORKERS': {
'BUNDLE_DIR_NAME': 'bundles/',
'STATS_FILE': os.path.join(STATIC_ROOT, 'webpack-worker-stats.json')
WEBPACK_CONFIG_PATH = 'webpack.prod.config.js'
########################## DJANGO DEBUG TOOLBAR ###############################
# We don't enable Django Debug Toolbar universally, but whenever we do, we want
# to avoid patching settings. Patched settings can cause circular import
# problems: https://django-debug-toolbar.readthedocs.org/en/1.0/installation.html#explicit-setup
DEBUG_TOOLBAR_PATCH_SETTINGS = False
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
################################# CELERY ######################################
# Message configuration
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_MESSAGE_COMPRESSION = 'gzip'
# Results configuration
CELERY_IGNORE_RESULT = False
CELERY_STORE_ERRORS_EVEN_IF_IGNORED = True
# Events configuration
CELERY_TRACK_STARTED = True
CELERY_SEND_EVENTS = True
CELERY_SEND_TASK_SENT_EVENT = True
# Exchange configuration
CELERY_DEFAULT_EXCHANGE = 'edx.core'
CELERY_DEFAULT_EXCHANGE_TYPE = 'direct'
# Queues configuration
HIGH_PRIORITY_QUEUE = 'edx.core.high'
DEFAULT_PRIORITY_QUEUE = 'edx.core.default'
David Ormsbee
committed
HIGH_MEM_QUEUE = 'edx.core.high_mem'
CELERY_QUEUE_HA_POLICY = 'all'
CELERY_CREATE_MISSING_QUEUES = True
CELERY_DEFAULT_QUEUE = DEFAULT_PRIORITY_QUEUE
CELERY_DEFAULT_ROUTING_KEY = DEFAULT_PRIORITY_QUEUE
CELERY_QUEUES = [
'edx.lms.core.default',
'edx.lms.core.high',
'edx.lms.core.high_mem'
]
# let logging work as configured:
CELERYD_HIJACK_ROOT_LOGGER = False
CELERY_BROKER_VHOST = ''
CELERY_BROKER_USE_SSL = False
CELERY_EVENT_QUEUE_TTL = None
CELERY_BROKER_TRANSPORT = 'amqp'
CELERY_BROKER_HOSTNAME = 'localhost'
CELERY_BROKER_USER = 'celery'
CELERY_BROKER_PASSWORD = 'celery'
############################## HEARTBEAT ######################################
# Checks run in normal mode by the heartbeat djangoapp
HEARTBEAT_CHECKS = [
'openedx.core.djangoapps.heartbeat.default_checks.check_modulestore',
'openedx.core.djangoapps.heartbeat.default_checks.check_database',
]
# Other checks to run by default in "extended"/heavy mode
HEARTBEAT_EXTENDED_CHECKS = (
'openedx.core.djangoapps.heartbeat.default_checks.check_celery',
)
HEARTBEAT_CELERY_TIMEOUT = 5
HEARTBEAT_CELERY_ROUTING_KEY = HIGH_PRIORITY_QUEUE
################################ Block Structures ###################################
# .. setting_name: BLOCK_STRUCTURES_SETTINGS
# .. setting_default: dict of settings
# .. setting_description: Stores all the settings used by block structures and block structure
# related tasks. See BLOCK_STRUCTURES_SETTINGS[XXX] documentation for details of each setting.
# For more information, check https://openedx.atlassian.net/browse/TNL-5041.
BLOCK_STRUCTURES_SETTINGS = dict(
# .. setting_name: BLOCK_STRUCTURES_SETTINGS['COURSE_PUBLISH_TASK_DELAY']
# .. setting_default: 30
# .. setting_description: Delay, in seconds, after a new edit of a course is published before
# updating the block structures cache. This is needed for a better chance at getting
# the latest changes when there are secondary reads in sharded mongoDB clusters.
# For more information, check https://openedx.atlassian.net/browse/TNL-5041.
COURSE_PUBLISH_TASK_DELAY=30,
# .. setting_name: BLOCK_STRUCTURES_SETTINGS['TASK_DEFAULT_RETRY_DELAY']
# .. setting_default: 30
# .. setting_description: Delay, in seconds, between retry attempts if a block structure task
# fails. For more information, check https://openedx.atlassian.net/browse/TNL-5041.
TASK_DEFAULT_RETRY_DELAY=30,
# .. setting_name: BLOCK_STRUCTURES_SETTINGS['TASK_MAX_RETRIES']
# .. setting_default: 5
# .. setting_description: Maximum number of retries per block structure task.
# If the maximum number of retries is exceeded, then you can attempt to either manually run
# the celery task, or wait for it to be triggered again.
# For more information, check https://openedx.atlassian.net/browse/TNL-5041.
TASK_MAX_RETRIES=5,
# .. toggle_name: BLOCK_STRUCTURES_SETTINGS['PRUNING_ACTIVE']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When `True`, only a specified number of versions of block structure
# files are kept for each structure, and the rest are cleaned up. The number of versions that
# are kept can be specified in the `BlockStructureConfiguration`, which can be edited in
# Django Admin. The default number of versions that are kept is `5`.
# .. toggle_warnings: This toggle will likely be deprecated and removed.
# The annotation will be updated with the DEPR ticket once that process has started.
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2018-03-22
# .. toggle_target_removal_date: 2018-06-22
# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-499
################################ Bulk Email ###################################
# Suffix used to construct 'from' email address for bulk emails.
# A course-specific identifier is prepended.
BULK_EMAIL_DEFAULT_FROM_EMAIL = 'no-reply@example.com'
# Parameters for breaking down course enrollment into subtasks.
# Initial delay used for retrying tasks. Additional retries use
# longer delays. Value is in seconds.
BULK_EMAIL_DEFAULT_RETRY_DELAY = 30
# Maximum number of retries per task for errors that are not related
# to throttling.
BULK_EMAIL_MAX_RETRIES = 5
# Maximum number of retries per task for errors that are related to
# throttling. If this is not set, then there is no cap on such retries.
BULK_EMAIL_INFINITE_RETRY_CAP = 1000
# We want Bulk Email running on the high-priority queue, so we define the
# routing key that points to it. At the moment, the name is the same.
BULK_EMAIL_ROUTING_KEY = HIGH_PRIORITY_QUEUE
# We also define a queue for smaller jobs so that large courses don't block
# smaller emails (see BULK_EMAIL_JOB_SIZE_THRESHOLD setting)
BULK_EMAIL_ROUTING_KEY_SMALL_JOBS = 'edx.lms.core.default'
# For emails with fewer than these number of recipients, send them through
# a different queue to avoid large courses blocking emails that are meant to be
# sent to self and staff
BULK_EMAIL_JOB_SIZE_THRESHOLD = 100
# Flag to indicate if individual email addresses should be logged as they are sent
# a bulk email message.
BULK_EMAIL_LOG_SENT_EMAILS = False
# Delay in seconds to sleep between individual mail messages being sent,
# when a bulk email task is retried for rate-related reasons. Choose this
# value depending on the number of workers that might be sending email in
# parallel, and what the SES rate is.
BULK_EMAIL_RETRY_DELAY_BETWEEN_SENDS = 0.02
############################# Email Opt In ####################################
# Minimum age for organization-wide email opt in
EMAIL_OPTIN_MINIMUM_AGE = PARENTAL_CONSENT_AGE_LIMIT
############################## Video ##########################################
YOUTUBE = {
# YouTube JavaScript API
'API': 'https://www.youtube.com/iframe_api',
'TEST_TIMEOUT': 1500,
# URL to get YouTube metadata
'METADATA_URL': 'https://www.googleapis.com/youtube/v3/videos/',
# Current youtube api for requesting transcripts.
# For example: http://video.google.com/timedtext?lang=en&v=j_jEn79vS3g.
'TEXT_API': {
'url': 'video.google.com/timedtext',
'params': {
'lang': 'en',
'v': 'set_youtube_id_of_11_symbols_here',
},
},
'IMAGE_API': 'http://img.youtube.com/vi/{youtube_id}/0.jpg', # /maxresdefault.jpg for 1920*1080
################################### APPS ######################################
Ari Rizzitano
committed
# The order of INSTALLED_APPS is important, when adding new apps here
# remember to check that you are not creating new
# RemovedInDjango19Warnings in the test logs.
INSTALLED_APPS = [
# Standard ones that are always installed...
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.humanize',
'django.contrib.messages',
Hasnain
committed
'django.contrib.redirects',
'django.contrib.sessions',
'django.contrib.sites',
# Common Initialization
'openedx.core.djangoapps.common_initialization.apps.CommonInitializationConfig',
# LMS-specific Initialization
'lms.djangoapps.lms_initialization.apps.LMSInitializationConfig',
# Common views
'openedx.core.djangoapps.common_views',
# History tables
'simple_history',
# Database-backed configuration
'config_models',
Calen Pennington
committed
'openedx.core.djangoapps.config_model_utils',
'openedx.core.djangoapps.service_status',
# Display status message to students
Kyle McCormick
committed
'common.djangoapps.status',
Kyle McCormick
committed
'common.djangoapps.edxmako.apps.EdxMakoConfig',
Kyle McCormick
committed
'common.djangoapps.static_replace',
# For user interface plugins
'web_fragments',
'openedx.core.djangoapps.plugin_api',
# For content serving
'openedx.core.djangoapps.contentserver',
# Site configuration for theming and behavioral modification
'openedx.core.djangoapps.site_configuration',
# Video module configs (This will be moved to Video once it becomes an XBlock)
'openedx.core.djangoapps.video_config',
# edX Video Pipeline integration
'openedx.core.djangoapps.video_pipeline',
'lms.djangoapps.courseware',
'lms.djangoapps.coursewarehistoryextended',
Kyle McCormick
committed
'common.djangoapps.student.apps.StudentConfig',
'lms.djangoapps.static_template_view',
'lms.djangoapps.staticbook',
Kyle McCormick
committed
'common.djangoapps.track',
'eventtracking.django.apps.EventTrackingConfig',
Kyle McCormick
committed
'common.djangoapps.util',
'lms.djangoapps.certificates.apps.CertificatesConfig',
'lms.djangoapps.dashboard',
'lms.djangoapps.instructor_task',
'openedx.core.djangoapps.course_groups',
'lms.djangoapps.bulk_email',
'lms.djangoapps.branding',
Braden MacDonald
committed
# New (Blockstore-based) XBlock runtime
'openedx.core.djangoapps.xblock.apps.LmsXBlockAppConfig',
'lms.djangoapps.support',
# django-oauth-toolkit
'oauth2_provider',
'openedx.core.djangoapps.oauth_dispatch.apps.OAuthDispatchAppConfig',
Kyle McCormick
committed
'common.djangoapps.third_party_auth',
# System Wide Roles
'openedx.core.djangoapps.system_wide_roles',
'openedx.core.djangoapps.auth_exchange',
'wiki', # The new django-wiki from benjaoming
Bridger Maxwell
committed
'django_notify',
'lms.djangoapps.course_wiki', # Our customizations
Bridger Maxwell
committed
'mptt',
'sekizai',
Bridger Maxwell
committed
'wiki.plugins.links',
# Notifications were enabled, but only 11 people used it in three years. It
# got tangled up during the Django 1.8 migration, so we are disabling it.
# See TNL-3783 for details.
#'wiki.plugins.notifications',
'lms.djangoapps.course_wiki.plugins.markdownedx',
# For testing
'django.contrib.admin', # only used in DEBUG mode
'lms.djangoapps.debug',
'openedx.core.djangoapps.util.apps.UtilConfig',
'openedx.core.djangoapps.django_comment_common',
'openedx.core.djangoapps.discussions',
'lms.djangoapps.edxnotes',
# Splash screen
'splash',
# User API
'rest_framework',
'openedx.core.djangoapps.user_api',
'lms.djangoapps.shoppingcart',
Kyle McCormick
committed
'common.djangoapps.course_modes.apps.CourseModesConfig',
'openedx.core.djangoapps.enrollments.apps.EnrollmentsConfig',
# Entitlement API
Kyle McCormick
committed
'common.djangoapps.entitlements.apps.EntitlementsConfig',
'lms.djangoapps.bulk_enroll',
# Student Identity Verification
'lms.djangoapps.verify_student.apps.VerifyStudentConfig',
# Dark-launching languages
'openedx.core.djangoapps.dark_lang',
# RSS Proxy
'lms.djangoapps.rss_proxy',
'openedx.core.djangoapps.embargo',
Calen Pennington
committed
Kyle McCormick
committed
'common.djangoapps.course_action_state',
# Additional problem types
'edx_jsme', # Molecular Structure
'django_countries',
# edX Mobile API
'lms.djangoapps.mobile_api.apps.MobileApiConfig',
Chris Dodge
committed
# Surveys
'lms.djangoapps.survey.apps.SurveyConfig',
'lms.djangoapps.lms_xblock.apps.LMSXBlockConfig',
'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig',
'openedx.core.djangoapps.content.block_structure.apps.BlockStructureConfig',
Adam Palay
committed
# Coursegraph
'openedx.core.djangoapps.coursegraph.apps.CoursegraphConfig',
'lms.djangoapps.mailing',
'lms.djangoapps.commerce.apps.CommerceConfig',
'openedx.core.djangoapps.credit.apps.CreditConfig',
Kyle McCormick
committed
'common.djangoapps.xblock_django',
# programs support
'openedx.core.djangoapps.programs.apps.ProgramsConfig',
# Catalog integration
'openedx.core.djangoapps.catalog',
# Self-paced course configuration
'openedx.core.djangoapps.self_paced',
# edx-milestones service
'milestones',
# Gating of course content
'lms.djangoapps.gating.apps.GatingConfig',
# Static i18n support
'statici18n',
# API access administration
'openedx.core.djangoapps.api_admin',
# Verified Track Content Cohorting (Beta feature that will hopefully be removed)
'openedx.core.djangoapps.verified_track_content',
# Learner's dashboard
'lms.djangoapps.learner_dashboard',
# Needed whether or not enabled, due to migrations
'lms.djangoapps.badges.apps.BadgesConfig',
Hasnain
committed
# Enables default site and redirects
'django_sites_extensions',
# Email marketing integration
'lms.djangoapps.email_marketing.apps.EmailMarketingConfig',
# additional release utilities to ease automation
'release_util',
# rule-based authorization
'rules.apps.AutodiscoverRulesConfig',
# Customized celery tasks, including persisting failed tasks so they can
# be retried
# Ability to detect and special-case crawler behavior
'openedx.core.djangoapps.crawlers',
Kyle McCormick
committed
'common.djangoapps.database_fixups',
'openedx.core.djangoapps.waffle_utils',
'openedx.features.calendar_sync',