From fab11b90d71740eebe4a916b2cf52cae45d61e6b Mon Sep 17 00:00:00 2001 From: John Eskew Date: Thu, 6 Oct 2016 10:16:14 -0400 Subject: [PATCH] Move monkey_patch to openedx.core.djangoapps. --- cms/startup.py | 2 +- lms/startup.py | 2 +- {common => openedx/core}/djangoapps/monkey_patch/__init__.py | 2 +- .../core}/djangoapps/monkey_patch/django_db_models_options.py | 0 .../core}/djangoapps/monkey_patch/tests/__init__.py | 0 .../core}/djangoapps/monkey_patch/third_party_auth.py | 0 6 files changed, 3 insertions(+), 3 deletions(-) rename {common => openedx/core}/djangoapps/monkey_patch/__init__.py (97%) rename {common => openedx/core}/djangoapps/monkey_patch/django_db_models_options.py (100%) rename {common => openedx/core}/djangoapps/monkey_patch/tests/__init__.py (100%) rename {common => openedx/core}/djangoapps/monkey_patch/third_party_auth.py (100%) diff --git a/cms/startup.py b/cms/startup.py index 66de90bd8f..c00da4fb7e 100644 --- a/cms/startup.py +++ b/cms/startup.py @@ -10,7 +10,7 @@ settings.INSTALLED_APPS # pylint: disable=pointless-statement from openedx.core.lib.django_startup import autostartup import django -from monkey_patch import ( +from openedx.core.djangoapps.monkey_patch import ( third_party_auth, django_db_models_options ) diff --git a/lms/startup.py b/lms/startup.py index b4eefcb3fc..9cf6f6b33e 100644 --- a/lms/startup.py +++ b/lms/startup.py @@ -12,7 +12,7 @@ settings.INSTALLED_APPS # pylint: disable=pointless-statement from openedx.core.lib.django_startup import autostartup import logging import analytics -from monkey_patch import ( +from openedx.core.djangoapps.monkey_patch import ( third_party_auth, django_db_models_options ) diff --git a/common/djangoapps/monkey_patch/__init__.py b/openedx/core/djangoapps/monkey_patch/__init__.py similarity index 97% rename from common/djangoapps/monkey_patch/__init__.py rename to openedx/core/djangoapps/monkey_patch/__init__.py index 6c420e94eb..ed4b9fc261 100644 --- a/common/djangoapps/monkey_patch/__init__.py +++ b/openedx/core/djangoapps/monkey_patch/__init__.py @@ -28,7 +28,7 @@ solution), kindly follow these guidelines: - Add the following code where needed (typically cms/startup.py and lms/startup.py): ``` - from monkey_patch import your_module + from openedx.core.djangoapps.monkey_patch import your_module your_module.patch() ``` - Write tests! All code should be tested anyway, but with code that diff --git a/common/djangoapps/monkey_patch/django_db_models_options.py b/openedx/core/djangoapps/monkey_patch/django_db_models_options.py similarity index 100% rename from common/djangoapps/monkey_patch/django_db_models_options.py rename to openedx/core/djangoapps/monkey_patch/django_db_models_options.py diff --git a/common/djangoapps/monkey_patch/tests/__init__.py b/openedx/core/djangoapps/monkey_patch/tests/__init__.py similarity index 100% rename from common/djangoapps/monkey_patch/tests/__init__.py rename to openedx/core/djangoapps/monkey_patch/tests/__init__.py diff --git a/common/djangoapps/monkey_patch/third_party_auth.py b/openedx/core/djangoapps/monkey_patch/third_party_auth.py similarity index 100% rename from common/djangoapps/monkey_patch/third_party_auth.py rename to openedx/core/djangoapps/monkey_patch/third_party_auth.py