diff --git a/lms/envs/bok_choy.py b/lms/envs/bok_choy.py index d4c1dc733cbf79ab20684f7d5833c65fe5392691..55b2dc7776e31c8a2342794798ffacb918ec2c3b 100644 --- a/lms/envs/bok_choy.py +++ b/lms/envs/bok_choy.py @@ -11,11 +11,16 @@ support both generating static assets to a directory and also serving static from the same directory. """ +from __future__ import absolute_import + +# Silence noisy logs +import logging import os -from path import Path as path from tempfile import mkdtemp from django.utils.translation import ugettext_lazy +from path import Path as path + from openedx.core.release import RELEASE_LINE CONFIG_ROOT = path(__file__).abspath().dirname() @@ -32,7 +37,6 @@ os.environ['CONFIG_ROOT'] = CONFIG_ROOT os.environ['LMS_CFG'] = str.format("{config_root}/{service_variant}.yml", config_root=os.environ['CONFIG_ROOT'], service_variant=os.environ['SERVICE_VARIANT']) - from .production import * # pylint: disable=wildcard-import, unused-wildcard-import, wrong-import-position @@ -122,15 +126,11 @@ XQUEUE_INTERFACE['url'] = 'http://localhost:8040' EDXNOTES_PUBLIC_API = 'http://localhost:8042/api/v1' EDXNOTES_INTERNAL_API = 'http://localhost:8042/api/v1' - EDXNOTES_CONNECT_TIMEOUT = 10 # time in seconds EDXNOTES_READ_TIMEOUT = 10 # time in seconds - NOTES_DISABLED_TABS = [] -# Silence noisy logs -import logging LOG_OVERRIDES = [ ('track.middleware', logging.CRITICAL), ('edxmako.shortcuts', logging.ERROR), diff --git a/lms/envs/devstack.py b/lms/envs/devstack.py index fdad39946d9408e9a71009414bd8d75ac06ff5bc..64225c3898505d33cca46439673cb359fd7537bc 100644 --- a/lms/envs/devstack.py +++ b/lms/envs/devstack.py @@ -1,10 +1,19 @@ """ Specific overrides to the base prod settings to make development easier. """ +from __future__ import absolute_import + +# Silence noisy logs +import logging from os.path import abspath, dirname, join from corsheaders.defaults import default_headers as corsheaders_default_headers +# pylint: enable=unicode-format-string +##################################################################### +from openedx.core.djangoapps.plugins import constants as plugin_constants +from openedx.core.djangoapps.plugins import plugin_settings + from .production import * # pylint: disable=wildcard-import, unused-wildcard-import # Don't use S3 in devstack, fall back to filesystem @@ -31,8 +40,6 @@ IDA_LOGOUT_URI_LIST = [ ################################ LOGGERS ###################################### -# Silence noisy logs -import logging LOG_OVERRIDES = [ ('track.contexts', logging.CRITICAL), ('track.middleware', logging.CRITICAL), @@ -260,9 +267,6 @@ JWT_AUTH.update({ 'y5ZLcTUomo4rZLjghVpq6KZxfS6I1Vz79ZsMVUWEdXOYePCKKsrQG20ogQEkmTf9FT_SouC6jPcHLXw"}]}' ), }) -# pylint: enable=unicode-format-string -##################################################################### -from openedx.core.djangoapps.plugins import plugin_settings, constants as plugin_constants plugin_settings.add_plugins(__name__, plugin_constants.ProjectType.LMS, plugin_constants.SettingsType.DEVSTACK) diff --git a/lms/envs/devstack_optimized.py b/lms/envs/devstack_optimized.py index c13f6320bd0bc28d66755554f4656d9ad072e135..4070c771dc63956bb4c35f0a4f96ec836abdc5dc 100644 --- a/lms/envs/devstack_optimized.py +++ b/lms/envs/devstack_optimized.py @@ -18,6 +18,8 @@ as they are for non-optimized devstack. Instead, update_assets must be invoked each time that changes have been made. """ +from __future__ import absolute_import + import os ########################## Devstack settings ################################### diff --git a/lms/envs/devstack_with_worker.py b/lms/envs/devstack_with_worker.py index 0f4b6100546d8b301901a76540672fe7d08ead41..6516c1597b07196e1e3630c5656ba3e5271459d1 100644 --- a/lms/envs/devstack_with_worker.py +++ b/lms/envs/devstack_with_worker.py @@ -11,6 +11,8 @@ In two separate processes on devstack: ./manage.py lms celery worker --settings=devstack_with_worker """ +from __future__ import absolute_import + import os # We intentionally define lots of variables that aren't used, and diff --git a/lms/envs/static.py b/lms/envs/static.py index 1954f73504f1416f794d158997bbd1c782c01c6e..3e43371dca93da2852bf588c4e9c928bd0854598 100644 --- a/lms/envs/static.py +++ b/lms/envs/static.py @@ -12,10 +12,13 @@ sessions. Assumes structure: # want to import all variables from base settings files # pylint: disable=wildcard-import, unused-wildcard-import -from .common import * +from __future__ import absolute_import + from openedx.core.lib.derived import derive_settings from openedx.core.lib.logsettings import get_logger_config +from .common import * + STATIC_GRAB = True LOGGING = get_logger_config(ENV_ROOT / "log",