From 194ace0ff09b4451b60c50c2de9204392435075d Mon Sep 17 00:00:00 2001 From: George Song Date: Tue, 30 Aug 2016 10:50:27 -0700 Subject: [PATCH] Update to latest `django-debug-toolbar` Also make sure we set the recommended settings according to --- cms/envs/common.py | 12 +++--------- lms/envs/common.py | 9 +++++++++ requirements/edx/base.txt | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/cms/envs/common.py b/cms/envs/common.py index a7c0a3b39d..e0ac5d4f35 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -77,6 +77,9 @@ from lms.envs.common import ( REDIRECT_CACHE_KEY_PREFIX, JWT_AUTH, + + # django-debug-toolbar + DEBUG_TOOLBAR_PATCH_SETTINGS, ) from path import Path as path from warnings import simplefilter @@ -710,15 +713,6 @@ REQUIRE_EXCLUDE = ("build.txt",) # returns a list with the command arguments to execute. REQUIRE_ENVIRONMENT = "node" - -########################## DJANGO DEBUG TOOLBAR ############################### - -# We don't enable Django Debug Toolbar universally, but whenever we do, we want -# to avoid patching settings. Patched settings can cause circular import -# problems: http://django-debug-toolbar.readthedocs.org/en/1.0/installation.html#explicit-setup - -DEBUG_TOOLBAR_PATCH_SETTINGS = False - ################################# CELERY ###################################### # Message configuration diff --git a/lms/envs/common.py b/lms/envs/common.py index a24d47866f..0d7f0a7bf7 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -1706,6 +1706,15 @@ REQUIRE_JS_PATH_OVERRIDES = { 'js/groups/views/cohorts_dashboard_factory': 'js/groups/views/cohorts_dashboard_factory.js', 'draggabilly': 'js/vendor/draggabilly.js' } + +########################## DJANGO DEBUG TOOLBAR ############################### + +# We don't enable Django Debug Toolbar universally, but whenever we do, we want +# to avoid patching settings. Patched settings can cause circular import +# problems: http://django-debug-toolbar.readthedocs.org/en/1.0/installation.html#explicit-setup + +DEBUG_TOOLBAR_PATCH_SETTINGS = False + ################################# CELERY ###################################### # Celery's task autodiscovery won't find tasks nested in a tasks package. diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 047fff7c7b..006cd016af 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -138,7 +138,7 @@ ipaddr==2.1.11 django-cors-headers==1.1.0 # Debug toolbar -django_debug_toolbar==1.3.2 +django_debug_toolbar==1.5 # Used for testing before_after==0.1.3