diff --git a/cms/envs/aws.py b/cms/envs/aws.py index 855543d463..999a05c026 100644 --- a/cms/envs/aws.py +++ b/cms/envs/aws.py @@ -503,7 +503,7 @@ JWT_AUTH.update(ENV_TOKENS.get('JWT_AUTH', {})) ######################## CUSTOM COURSES for EDX CONNECTOR ###################### if FEATURES.get('CUSTOM_COURSES_EDX'): - INSTALLED_APPS.append('openedx.core.djangoapps.ccxcon') + INSTALLED_APPS.append('openedx.core.djangoapps.ccxcon.apps.CCXConnectorConfig') # Partner support link for CMS footer PARTNER_SUPPORT_EMAIL = ENV_TOKENS.get('PARTNER_SUPPORT_EMAIL', PARTNER_SUPPORT_EMAIL) diff --git a/cms/envs/common.py b/cms/envs/common.py index 6db12dcad1..0bb357666e 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -942,7 +942,7 @@ INSTALLED_APPS = [ 'openedx.core.djangoapps.service_status', # Bookmarks - 'openedx.core.djangoapps.bookmarks', + 'openedx.core.djangoapps.bookmarks.apps.BookmarksConfig', # Video module configs (This will be moved to Video once it becomes an XBlock) 'openedx.core.djangoapps.video_config', @@ -1018,7 +1018,7 @@ INSTALLED_APPS = [ # Additional problem types 'edx_jsme', # Molecular Structure - 'openedx.core.djangoapps.content.course_overviews', + 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig', 'openedx.core.djangoapps.content.course_structures.apps.CourseStructuresConfig', 'openedx.core.djangoapps.content.block_structure.apps.BlockStructureConfig', @@ -1191,19 +1191,19 @@ MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS = 15 * 60 # that this app should be inserted *before*. A None here means it should be appended to the list. OPTIONAL_APPS = ( ('mentoring', None), - ('problem_builder', 'openedx.core.djangoapps.content.course_overviews'), + ('problem_builder', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'), ('edx_sga', None), # edx-ora2 - ('submissions', 'openedx.core.djangoapps.content.course_overviews'), - ('openassessment', 'openedx.core.djangoapps.content.course_overviews'), - ('openassessment.assessment', 'openedx.core.djangoapps.content.course_overviews'), - ('openassessment.fileupload', 'openedx.core.djangoapps.content.course_overviews'), - ('openassessment.workflow', 'openedx.core.djangoapps.content.course_overviews'), - ('openassessment.xblock', 'openedx.core.djangoapps.content.course_overviews'), + ('submissions', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'), + ('openassessment', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'), + ('openassessment.assessment', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'), + ('openassessment.fileupload', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'), + ('openassessment.workflow', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'), + ('openassessment.xblock', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'), # edxval - ('edxval', 'openedx.core.djangoapps.content.course_overviews'), + ('edxval', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'), # Organizations App (http://github.com/edx/edx-organizations) ('organizations', None), diff --git a/cms/envs/test.py b/cms/envs/test.py index 86e4312906..f620823303 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -331,7 +331,7 @@ FEATURES['ENABLE_TEAMS'] = True SECRET_KEY = '85920908f28904ed733fe576320db18cabd7b6cd' ######### custom courses ######### -INSTALLED_APPS.append('openedx.core.djangoapps.ccxcon') +INSTALLED_APPS.append('openedx.core.djangoapps.ccxcon.apps.CCXConnectorConfig') FEATURES['CUSTOM_COURSES_EDX'] = True # API access management -- needed for simple-history to run. diff --git a/cms/envs/yaml_config.py b/cms/envs/yaml_config.py index 1def36ef06..b8861d32ac 100644 --- a/cms/envs/yaml_config.py +++ b/cms/envs/yaml_config.py @@ -259,7 +259,7 @@ BROKER_USE_SSL = ENV_TOKENS.get('CELERY_BROKER_USE_SSL', False) ######################## CUSTOM COURSES for EDX CONNECTOR ###################### if FEATURES.get('CUSTOM_COURSES_EDX'): - INSTALLED_APPS.append('openedx.core.djangoapps.ccxcon') + INSTALLED_APPS.append('openedx.core.djangoapps.ccxcon.apps.CCXConnectorConfig') ########################## Extra middleware classes ####################### diff --git a/lms/envs/aws.py b/lms/envs/aws.py index 7be1753a7c..e9e61a4db3 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -823,7 +823,7 @@ ECOMMERCE_SERVICE_WORKER_USERNAME = ENV_TOKENS.get( ##### Custom Courses for EdX ##### if FEATURES.get('CUSTOM_COURSES_EDX'): - INSTALLED_APPS += ['lms.djangoapps.ccx', 'openedx.core.djangoapps.ccxcon'] + INSTALLED_APPS += ['lms.djangoapps.ccx', 'openedx.core.djangoapps.ccxcon.apps.CCXConnectorConfig'] MODULESTORE_FIELD_OVERRIDE_PROVIDERS += ( 'lms.djangoapps.ccx.overrides.CustomCoursesForEdxOverrideProvider', ) diff --git a/lms/envs/common.py b/lms/envs/common.py index 824435cbb4..2806b35b95 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -2079,7 +2079,7 @@ INSTALLED_APPS = [ 'openedx.core.djangoapps.video_config', # Bookmarks - 'openedx.core.djangoapps.bookmarks', + 'openedx.core.djangoapps.bookmarks.apps.BookmarksConfig', # Our courseware 'courseware', @@ -2224,7 +2224,7 @@ INSTALLED_APPS = [ 'lms.djangoapps.lms_xblock', # Course data caching - 'openedx.core.djangoapps.content.course_overviews', + 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig', 'openedx.core.djangoapps.content.course_structures.apps.CourseStructuresConfig', 'openedx.core.djangoapps.content.block_structure.apps.BlockStructureConfig', 'lms.djangoapps.course_blocks', @@ -2886,19 +2886,19 @@ ALL_LANGUAGES = [ # that this app should be inserted *before*. A None here means it should be appended to the list. OPTIONAL_APPS = [ ('mentoring', None), - ('problem_builder', 'openedx.core.djangoapps.content.course_overviews'), + ('problem_builder', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'), ('edx_sga', None), # edx-ora2 - ('submissions', 'openedx.core.djangoapps.content.course_overviews'), - ('openassessment', 'openedx.core.djangoapps.content.course_overviews'), - ('openassessment.assessment', 'openedx.core.djangoapps.content.course_overviews'), - ('openassessment.fileupload', 'openedx.core.djangoapps.content.course_overviews'), - ('openassessment.workflow', 'openedx.core.djangoapps.content.course_overviews'), - ('openassessment.xblock', 'openedx.core.djangoapps.content.course_overviews'), + ('submissions', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'), + ('openassessment', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'), + ('openassessment.assessment', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'), + ('openassessment.fileupload', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'), + ('openassessment.workflow', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'), + ('openassessment.xblock', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'), # edxval - ('edxval', 'openedx.core.djangoapps.content.course_overviews'), + ('edxval', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'), # edX Proctoring ('edx_proctoring', None), diff --git a/lms/envs/test.py b/lms/envs/test.py index d683b05c47..a86d172590 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -552,7 +552,7 @@ FACEBOOK_APP_ID = "Test" FACEBOOK_API_VERSION = "v2.8" ######### custom courses ######### -INSTALLED_APPS += ['lms.djangoapps.ccx', 'openedx.core.djangoapps.ccxcon'] +INSTALLED_APPS += ['lms.djangoapps.ccx', 'openedx.core.djangoapps.ccxcon.apps.CCXConnectorConfig'] FEATURES['CUSTOM_COURSES_EDX'] = True # Set dummy values for profile image settings. diff --git a/lms/envs/yaml_config.py b/lms/envs/yaml_config.py index 83ed8b56b7..1bfc0df5f6 100644 --- a/lms/envs/yaml_config.py +++ b/lms/envs/yaml_config.py @@ -306,7 +306,7 @@ GRADES_DOWNLOAD_ROUTING_KEY = HIGH_MEM_QUEUE ##### Custom Courses for EdX ##### if FEATURES.get('CUSTOM_COURSES_EDX'): - INSTALLED_APPS += ['lms.djangoapps.ccx', 'openedx.core.djangoapps.ccxcon'] + INSTALLED_APPS += ['lms.djangoapps.ccx', 'openedx.core.djangoapps.ccxcon.apps.CCXConnectorConfig'] MODULESTORE_FIELD_OVERRIDE_PROVIDERS += ( 'lms.djangoapps.ccx.overrides.CustomCoursesForEdxOverrideProvider', ) diff --git a/openedx/core/djangoapps/bookmarks/apps.py b/openedx/core/djangoapps/bookmarks/apps.py new file mode 100644 index 0000000000..b0ab511bf8 --- /dev/null +++ b/openedx/core/djangoapps/bookmarks/apps.py @@ -0,0 +1,16 @@ +""" +Configuration for bookmarks Django app +""" +from django.apps import AppConfig + + +class BookmarksConfig(AppConfig): + """ + Configuration class for bookmarks Django app + """ + name = 'openedx.core.djangoapps.bookmarks' + verbose_name = "Bookmarks" + + def ready(self): + # Register the signals handled by bookmarks. + from . import signals diff --git a/openedx/core/djangoapps/bookmarks/startup.py b/openedx/core/djangoapps/bookmarks/startup.py deleted file mode 100644 index d3867d383c..0000000000 --- a/openedx/core/djangoapps/bookmarks/startup.py +++ /dev/null @@ -1,5 +0,0 @@ -""" -Setup the signals on startup. -""" - -from . import signals # pylint: disable=unused-import diff --git a/openedx/core/djangoapps/ccxcon/__init__.py b/openedx/core/djangoapps/ccxcon/__init__.py index 9a97524877..98a839e469 100644 --- a/openedx/core/djangoapps/ccxcon/__init__.py +++ b/openedx/core/djangoapps/ccxcon/__init__.py @@ -6,5 +6,3 @@ that is used to interact with the CCX and their master courses. The ccxcon app needs to be placed in `openedx.core.djangoapps` because it will be used both in CMS and LMS. """ - -default_app_config = 'openedx.core.djangoapps.ccxcon.apps.CCXConnectorConfig' diff --git a/openedx/core/djangoapps/content/course_overviews/apps.py b/openedx/core/djangoapps/content/course_overviews/apps.py new file mode 100644 index 0000000000..f972abab03 --- /dev/null +++ b/openedx/core/djangoapps/content/course_overviews/apps.py @@ -0,0 +1,17 @@ +""" +Configuration for course_overviews Django app +""" +from django.apps import AppConfig + + +class CourseOverviewsConfig(AppConfig): + """ + Configuration class for course_overviews Django app + """ + name = 'openedx.core.djangoapps.content.course_overviews' + verbose_name = "Course Overviews" + + def ready(self): + # Import signals to activate signal handler which invalidates + # the CourseOverview cache every time a course is published. + from . import signals # pylint: disable=unused-import diff --git a/openedx/core/djangoapps/content/course_overviews/startup.py b/openedx/core/djangoapps/content/course_overviews/startup.py deleted file mode 100644 index 8ec2e71004..0000000000 --- a/openedx/core/djangoapps/content/course_overviews/startup.py +++ /dev/null @@ -1,5 +0,0 @@ -"""Code run at server start up to initialize the course_overviews app.""" - -# Importing signals is necessary to activate signal handler, which invalidates -# the CourseOverview cache every time a course is published. -import openedx.core.djangoapps.content.course_overviews.signals # pylint: disable=unused-import