diff options
-rw-r--r-- | patchwork/settings/dev.py | 30 | ||||
-rw-r--r-- | requirements-dev.txt | 1 | ||||
-rw-r--r-- | requirements-test.txt | 1 |
3 files changed, 19 insertions, 13 deletions
diff --git a/patchwork/settings/dev.py b/patchwork/settings/dev.py index 711177c..53fa58f 100644 --- a/patchwork/settings/dev.py +++ b/patchwork/settings/dev.py @@ -14,6 +14,11 @@ try: except ImportError: dbbackup = None +try: + import debug_toolbar +except ImportError: + debug_toolbar = None + # # Core settings # https://docs.djangoproject.com/en/1.11/ref/settings/#core-settings @@ -61,21 +66,22 @@ PASSWORD_HASHERS = ['django.contrib.auth.hashers.MD5PasswordHasher'] # django-debug-toolbar -INSTALLED_APPS += [ - 'debug_toolbar' -] +if debug_toolbar: + INSTALLED_APPS += [ + 'debug_toolbar' + ] -DEBUG_TOOLBAR_PATCH_SETTINGS = False + DEBUG_TOOLBAR_PATCH_SETTINGS = False # This should go first in the middleware classes -MIDDLEWARE = [ - 'debug_toolbar.middleware.DebugToolbarMiddleware', -] + MIDDLEWARE - -INTERNAL_IPS = [ - '127.0.0.1', '::1', - '172.18.0.1' -] + MIDDLEWARE = [ + 'debug_toolbar.middleware.DebugToolbarMiddleware', + ] + MIDDLEWARE + + INTERNAL_IPS = [ + '127.0.0.1', '::1', + '172.18.0.1' + ] # django-dbbackup diff --git a/requirements-dev.txt b/requirements-dev.txt index ed98c30..994b9b6 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -3,5 +3,6 @@ Django==1.11.15; python_version < '3.0' # pyup: ignore djangorestframework==3.8.2 django-filter==2.0.0; python_version >= '3.4' django-filter==1.1.0; python_version < '3.0' # pyup: ignore +django-debug-toolbar==1.10.1 django-dbbackup==3.2.0 -r requirements-test.txt diff --git a/requirements-test.txt b/requirements-test.txt index 1deb86a..6203355 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,3 @@ mysqlclient==1.3.13 psycopg2-binary==2.7.5 -django-debug-toolbar==1.10.1 python-dateutil==2.7.3 |