Move settings validation out of startup.py

This also creates a new app common_initialization in order to provide a
place to run initialization code common to both the LMS and CMS.
This commit is contained in:
Troy Sankey
2017-11-01 15:43:55 -04:00
parent 47e3c68faf
commit c19eaef075
8 changed files with 70 additions and 52 deletions

View File

@@ -2034,7 +2034,10 @@ INSTALLED_APPS = [
'django.contrib.staticfiles',
'djcelery',
# Initialization
# Common Initialization
'openedx.core.djangoapps.common_initialization.apps.CommonInitializationConfig',
# LMS-specific Initialization
'lms_initialization.apps.LMSInitializationConfig',
# Common views

View File

@@ -18,8 +18,6 @@ from openedx.core.djangoapps.monkey_patch import django_db_models_options
import xmodule.x_module
import lms_xblock.runtime
from startup_configurations.validate_config import validate_lms_config
log = logging.getLogger(__name__)
@@ -45,9 +43,6 @@ def run():
xmodule.x_module.descriptor_global_handler_url = lms_xblock.runtime.handler_url
xmodule.x_module.descriptor_global_local_resource_url = lms_xblock.runtime.local_resource_url
# validate configurations on startup
validate_lms_config(settings)
def add_mimetypes():
"""