Skip to content

Commit

Permalink
fix(ci): no toolbar during test runs
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobCoffee committed Oct 8, 2024
1 parent e80d424 commit 83b9773
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions pydotorg/settings/local.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import sys

from .base import *
import os

Expand All @@ -6,10 +8,6 @@
ALLOWED_HOSTS = ['*']
INTERNAL_IPS = ['127.0.0.1']

DEBUG_TOOLBAR_CONFIG = {
"SHOW_TOOLBAR_CALLBACK" : lambda request: True,
}

# Set the path to the location of the content files for python.org
# For example,
# PYTHON_ORG_CONTENT_SVN_PATH = '/Users/flavio/working_copies/beta.python.org/build/data'
Expand Down Expand Up @@ -58,9 +56,12 @@
# yui-compressor.
# PIPELINE['YUI_BINARY'] = '/usr/bin/java -Xss200048k -jar /usr/share/yui-compressor/yui-compressor.jar'

INSTALLED_APPS += [
'debug_toolbar',
]

if "test" not in sys.argv and DEBUG:
INSTALLED_APPS += ["debug_toolbar"]
DEBUG_TOOLBAR_CONFIG = {
"SHOW_TOOLBAR_CALLBACK": lambda request: True,
}

MIDDLEWARE += [
'debug_toolbar.middleware.DebugToolbarMiddleware',
Expand Down

0 comments on commit 83b9773

Please sign in to comment.