Commit bf1a3bc7 by Clinton Blackburn

Fixed settings for Django Debug Toolbar

ECOM-5559 and ECOM-5440
parent 2c235dbc
......@@ -373,3 +373,34 @@ TAGGIT_CASE_INSENSITIVE = True
# django-solo configuration (https://github.com/lazybird/django-solo#settings)
SOLO_CACHE = 'default'
SOLO_CACHE_TIMEOUT = 3600
# Django Debug Toolbar settings
# http://django-debug-toolbar.readthedocs.org/en/latest/installation.html
if os.environ.get('ENABLE_DJANGO_TOOLBAR', False):
INSTALLED_APPS += [
'debug_toolbar',
'elastic_panel',
]
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
DEBUG_TOOLBAR_PATCH_SETTINGS = False
DEBUG_TOOLBAR_PANELS = [
'debug_toolbar.panels.versions.VersionsPanel',
'debug_toolbar.panels.timer.TimerPanel',
'debug_toolbar.panels.settings.SettingsPanel',
'debug_toolbar.panels.headers.HeadersPanel',
'debug_toolbar.panels.request.RequestPanel',
'debug_toolbar.panels.sql.SQLPanel',
'debug_toolbar.panels.staticfiles.StaticFilesPanel',
'debug_toolbar.panels.templates.TemplatesPanel',
'debug_toolbar.panels.cache.CachePanel',
'debug_toolbar.panels.signals.SignalsPanel',
'debug_toolbar.panels.logging.LoggingPanel',
'debug_toolbar.panels.redirects.RedirectsPanel',
'elastic_panel.panel.ElasticDebugPanel'
]
from course_discovery.settings.production import *
from course_discovery.settings.shared.debug_toolbar import *
DEBUG = True
......@@ -8,8 +7,9 @@ LOGGING['handlers']['local'] = {
'class': 'logging.NullHandler',
}
# Determine which requests should render Django Debug Toolbar
INTERNAL_IPS = ('127.0.0.1',)
# END TOOLBAR CONFIGURATION
HAYSTACK_CONNECTIONS = {
......
from course_discovery.settings.base import *
from course_discovery.settings.shared.debug_toolbar import *
DEBUG = True
......@@ -31,8 +30,8 @@ DATABASES = {
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# END EMAIL CONFIGURATION
# Determine which requests should render Django Debug Toolbar
INTERNAL_IPS = ('127.0.0.1',)
# END TOOLBAR CONFIGURATION
# AUTHENTICATION
# Set these to the correct values for your OAuth2/OpenID Connect provider (e.g., devstack)
......
"""
Django Debug Toolbar settings.
http://django-debug-toolbar.readthedocs.org/en/latest/installation.html
"""
from course_discovery.settings.base import *
if os.environ.get('ENABLE_DJANGO_TOOLBAR', False):
INSTALLED_APPS += [
'debug_toolbar',
'elastic_panel',
]
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
DEBUG_TOOLBAR_PATCH_SETTINGS = False
DEBUG_TOOLBAR_PANELS = [
'debug_toolbar.panels.versions.VersionsPanel',
'debug_toolbar.panels.timer.TimerPanel',
'debug_toolbar.panels.settings.SettingsPanel',
'debug_toolbar.panels.headers.HeadersPanel',
'debug_toolbar.panels.request.RequestPanel',
'debug_toolbar.panels.sql.SQLPanel',
'debug_toolbar.panels.staticfiles.StaticFilesPanel',
'debug_toolbar.panels.templates.TemplatesPanel',
'debug_toolbar.panels.cache.CachePanel',
'debug_toolbar.panels.signals.SignalsPanel',
'debug_toolbar.panels.logging.LoggingPanel',
'debug_toolbar.panels.redirects.RedirectsPanel',
'elastic_panel.panel.ElasticDebugPanel'
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment