diff --git a/cms/envs/common.py b/cms/envs/common.py index 7be15a377d..532c175ebe 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -876,7 +876,8 @@ INSTALLED_APPS = ( 'edx_jsme', # Molecular Structure 'openedx.core.djangoapps.content.course_overviews', - 'openedx.core.djangoapps.content.course_structures', + 'openedx.core.djangoapps.content.course_structures.apps.CourseStructuresConfig', + 'openedx.core.djangoapps.content.block_structure.apps.BlockStructureConfig', # Credit courses 'openedx.core.djangoapps.credit', diff --git a/lms/envs/common.py b/lms/envs/common.py index 631a36b206..fc4b8054ec 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -2033,7 +2033,8 @@ INSTALLED_APPS = ( # Course data caching 'openedx.core.djangoapps.content.course_overviews', - 'openedx.core.djangoapps.content.course_structures', + 'openedx.core.djangoapps.content.course_structures.apps.CourseStructuresConfig', + 'openedx.core.djangoapps.content.block_structure.apps.BlockStructureConfig', 'lms.djangoapps.course_blocks', # Old course structure API diff --git a/openedx/core/djangoapps/content/__init__.py b/openedx/core/djangoapps/content/__init__.py index 8bf6ec2753..e69de29bb2 100644 --- a/openedx/core/djangoapps/content/__init__.py +++ b/openedx/core/djangoapps/content/__init__.py @@ -1,5 +0,0 @@ -""" -Setup the signals on startup. -""" -import openedx.core.djangoapps.content.course_structures.signals -import openedx.core.djangoapps.content.block_structure.signals diff --git a/openedx/core/djangoapps/content/block_structure/apps.py b/openedx/core/djangoapps/content/block_structure/apps.py new file mode 100644 index 0000000000..4ccdc608c4 --- /dev/null +++ b/openedx/core/djangoapps/content/block_structure/apps.py @@ -0,0 +1,23 @@ +""" +Configuration for block_structure djangoapp +""" + +from django.apps import AppConfig + + +class BlockStructureConfig(AppConfig): + """ + block_structure django app. + """ + name = u'openedx.core.djangoapps.content.block_structure' + + def ready(self): + """ + Define tasks to perform at app loading time + + * Connect signal handlers + * Register celery tasks + + These happen at import time. Hence the unused imports + """ + from . import signals, tasks # pylint: disable=unused-variable diff --git a/openedx/core/djangoapps/content/course_structures/apps.py b/openedx/core/djangoapps/content/course_structures/apps.py new file mode 100644 index 0000000000..51ca56a572 --- /dev/null +++ b/openedx/core/djangoapps/content/course_structures/apps.py @@ -0,0 +1,19 @@ +""" +Django Application Configuration for course_structures app. +""" +from django.apps import AppConfig + + +class CourseStructuresConfig(AppConfig): + """ + Custom AppConfig for openedx.core.djangoapps.content.course_structures + """ + name = u'openedx.core.djangoapps.content.course_structures' + + def ready(self): + """ + Define tasks to perform at app loading time: + + * Connect signal handlers + """ + from . import signals # pylint: disable=unused-variable