def run(): """ Executed during django startup NOTE: DO **NOT** add additional code to this method or this file! The Platform Team is moving all startup code to more standard locations using Django best practices. """ django_db_models_options.patch() # Comprehensive theming needs to be set up before django startup, # because modifying django template paths after startup has no effect. if is_comprehensive_theming_enabled(): enable_theming() django.setup() autostartup() add_mimetypes() # In order to allow descriptors to use a handler url, we need to # monkey-patch the x_module library. # TODO: Remove this code when Runtimes are no longer created by modulestores # https://openedx.atlassian.net/wiki/display/PLAT/Convert+from+Storage-centric+runtimes+to+Application-centric+runtimes 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 # Set the version of docs that help-tokens will go to. settings.HELP_TOKENS_LANGUAGE_CODE = settings.LANGUAGE_CODE settings.HELP_TOKENS_VERSION = doc_version() # validate configurations on startup validate_cms_config(settings)
def run(): """ Executed during django startup """ django_db_models_options.patch() # Comprehensive theming needs to be set up before django startup, # because modifying django template paths after startup has no effect. if is_comprehensive_theming_enabled(): enable_theming() django.setup() autostartup() add_mimetypes() # In order to allow descriptors to use a handler url, we need to # monkey-patch the x_module library. # TODO: Remove this code when Runtimes are no longer created by modulestores # https://openedx.atlassian.net/wiki/display/PLAT/Convert+from+Storage-centric+runtimes+to+Application-centric+runtimes 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 run(): """ Executed during django startup """ django_db_models_options.patch() # Comprehensive theming needs to be set up before django startup, # because modifying django template paths after startup has no effect. if is_comprehensive_theming_enabled(): enable_theming() django.setup() autostartup() add_mimetypes() if settings.FEATURES.get('ENABLE_NOTIFICATIONS', False): startup_notification_subsystem() if settings.FEATURES.get('EDX_SOLUTIONS_API', False) and \ settings.FEATURES.get('DISABLE_SOLUTIONS_APPS_SIGNALS', False): disable_solutions_apps_signals() # In order to allow descriptors to use a handler url, we need to # monkey-patch the x_module library. # TODO: Remove this code when Runtimes are no longer created by modulestores # https://openedx.atlassian.net/wiki/display/PLAT/Convert+from+Storage-centric+runtimes+to+Application-centric+runtimes 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 # Set the version of docs that help-tokens will go to. settings.HELP_TOKENS_LANGUAGE_CODE = settings.LANGUAGE_CODE settings.HELP_TOKENS_VERSION = doc_version() # validate configurations on startup validate_cms_config(settings)
def run(): """ Executed during django startup """ django_db_models_options.patch() # Comprehensive theming needs to be set up before django startup, # because modifying django template paths after startup has no effect. if is_comprehensive_theming_enabled(): enable_theming() django.setup() autostartup() add_mimetypes() if settings.FEATURES.get('ENABLE_NOTIFICATIONS', False): startup_notification_subsystem() if settings.FEATURES.get('EDX_SOLUTIONS_API', False) and \ settings.FEATURES.get('DISABLE_SOLUTIONS_APPS_SIGNALS', False): disable_solutions_apps_signals() # In order to allow descriptors to use a handler url, we need to # monkey-patch the x_module library. # TODO: Remove this code when Runtimes are no longer created by modulestores # https://openedx.atlassian.net/wiki/display/PLAT/Convert+from+Storage-centric+runtimes+to+Application-centric+runtimes 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 # Set the version of docs that help-tokens will go to. settings.HELP_TOKENS_LANGUAGE_CODE = settings.LANGUAGE_CODE settings.HELP_TOKENS_VERSION = doc_version() # validate configurations on startup validate_cms_config(settings)