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

@@ -925,6 +925,9 @@ INSTALLED_APPS = [
'djcelery',
'method_override',
# Common Initialization
'openedx.core.djangoapps.common_initialization.apps.CommonInitializationConfig',
# Common views
'openedx.core.djangoapps.common_views',

View File

@@ -15,7 +15,6 @@ from openedx.core.lib.django_startup import autostartup
settings.INSTALLED_APPS # pylint: disable=pointless-statement
from openedx.core.lib.xblock_utils import xblock_local_resource_url
from startup_configurations.validate_config import validate_cms_config
def run():
@@ -40,9 +39,6 @@ def run():
xmodule.x_module.descriptor_global_handler_url = cms.lib.xblock.runtime.handler_url
xmodule.x_module.descriptor_global_local_resource_url = xblock_local_resource_url
# validate configurations on startup
validate_cms_config(settings)
def add_mimetypes():
"""