From 3be0fa81b824aef1ffd3f18a6978717ad69f813a Mon Sep 17 00:00:00 2001 From: Troy Sankey Date: Fri, 20 Oct 2017 16:32:15 -0400 Subject: [PATCH] Move verify_student signal registration to ready() --- lms/djangoapps/verify_student/__init__.py | 3 +++ lms/djangoapps/verify_student/apps.py | 19 +++++++++++++++++++ lms/djangoapps/verify_student/startup.py | 4 ---- lms/envs/common.py | 2 +- lms/envs/test_with_mysql.py | 2 +- 5 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 lms/djangoapps/verify_student/apps.py delete mode 100644 lms/djangoapps/verify_student/startup.py diff --git a/lms/djangoapps/verify_student/__init__.py b/lms/djangoapps/verify_student/__init__.py index e69de29bb2..cf9ef2ad15 100644 --- a/lms/djangoapps/verify_student/__init__.py +++ b/lms/djangoapps/verify_student/__init__.py @@ -0,0 +1,3 @@ +""" +Student Identity Verification App +""" diff --git a/lms/djangoapps/verify_student/apps.py b/lms/djangoapps/verify_student/apps.py new file mode 100644 index 0000000000..3d07692b14 --- /dev/null +++ b/lms/djangoapps/verify_student/apps.py @@ -0,0 +1,19 @@ +""" +Student Identity Verification Application Configuration +""" + +from django.apps import AppConfig + + +class VerifyStudentConfig(AppConfig): + """ + Application Configuration for verify_student. + """ + name = 'lms.djangoapps.verify_student' + verbose_name = 'Student Identity Verification' + + def ready(self): + """ + Connect signal handlers. + """ + from . import signals # pylint: disable=unused-variable diff --git a/lms/djangoapps/verify_student/startup.py b/lms/djangoapps/verify_student/startup.py deleted file mode 100644 index 8045c5f972..0000000000 --- a/lms/djangoapps/verify_student/startup.py +++ /dev/null @@ -1,4 +0,0 @@ -""" -Setup the signals on startup. -""" -import lms.djangoapps.verify_student.signals # pylint: disable=unused-import diff --git a/lms/envs/common.py b/lms/envs/common.py index 656a7a02a3..9d84f3f64a 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -2129,7 +2129,7 @@ INSTALLED_APPS = [ 'bulk_enroll', # Student Identity Verification - 'lms.djangoapps.verify_student', + 'lms.djangoapps.verify_student.apps.VerifyStudentConfig', # Dark-launching languages 'openedx.core.djangoapps.dark_lang', diff --git a/lms/envs/test_with_mysql.py b/lms/envs/test_with_mysql.py index 65ed10a56b..aad9b6ec8a 100644 --- a/lms/envs/test_with_mysql.py +++ b/lms/envs/test_with_mysql.py @@ -11,5 +11,5 @@ INSTALLED_APPS = [ 'django.contrib.auth', 'django.contrib.contenttypes', - 'lms.djangoapps.verify_student', + 'lms.djangoapps.verify_student.apps.VerifyStudentConfig', ]