Commit 88747024 by Braden MacDonald Committed by Calen Pennington

Upgrade django-debug-toolbar to 1.2.2

This is compatible with Django > 1.5, and allows us to re-enable the ProfilingDebugPanel
parent 9d956e03
...@@ -139,26 +139,17 @@ MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',) ...@@ -139,26 +139,17 @@ MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',)
INTERNAL_IPS = ('127.0.0.1',) INTERNAL_IPS = ('127.0.0.1',)
DEBUG_TOOLBAR_PANELS = ( DEBUG_TOOLBAR_PANELS = (
'debug_toolbar.panels.version.VersionDebugPanel', 'debug_toolbar.panels.versions.VersionsPanel',
'debug_toolbar.panels.timer.TimerDebugPanel', 'debug_toolbar.panels.timer.TimerPanel',
'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel', 'debug_toolbar.panels.settings.SettingsPanel',
'debug_toolbar.panels.headers.HeaderDebugPanel', 'debug_toolbar.panels.headers.HeadersPanel',
'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', 'debug_toolbar.panels.request.RequestPanel',
'debug_toolbar.panels.sql.SQLDebugPanel', 'debug_toolbar.panels.sql.SQLPanel',
'debug_toolbar.panels.signals.SignalDebugPanel', 'debug_toolbar.panels.signals.SignalsPanel',
'debug_toolbar.panels.logger.LoggingPanel', 'debug_toolbar.panels.logging.LoggingPanel',
'debug_toolbar.panels.profiling.ProfilingPanel',
# Enabling the profiler has a weird bug as of django-debug-toolbar==0.9.4 and
# Django=1.3.1/1.4 where requests to views get duplicated (your method gets
# hit twice). So you can uncomment when you need to diagnose performance
# problems, but you shouldn't leave it on.
# 'debug_toolbar.panels.profiling.ProfilingDebugPanel',
) )
DEBUG_TOOLBAR_CONFIG = {
'INTERCEPT_REDIRECTS': False
}
# To see stacktraces for MongoDB queries, set this to True. # To see stacktraces for MongoDB queries, set this to True.
# Stacktraces slow down page loads drastically (for pages with lots of queries). # Stacktraces slow down page loads drastically (for pages with lots of queries).
DEBUG_TOOLBAR_MONGO_STACKTRACES = False DEBUG_TOOLBAR_MONGO_STACKTRACES = False
......
...@@ -9,21 +9,16 @@ This configuration is to turn on the Django Toolbar stats for DB access stats, f ...@@ -9,21 +9,16 @@ This configuration is to turn on the Django Toolbar stats for DB access stats, f
from .dev import * from .dev import *
DEBUG_TOOLBAR_PANELS = ( DEBUG_TOOLBAR_PANELS = (
'debug_toolbar.panels.version.VersionDebugPanel', 'debug_toolbar.panels.versions.VersionsPanel',
'debug_toolbar.panels.timer.TimerDebugPanel', 'debug_toolbar.panels.timer.TimerPanel',
'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel', 'debug_toolbar.panels.settings.SettingsPanel',
'debug_toolbar.panels.headers.HeaderDebugPanel', 'debug_toolbar.panels.headers.HeadersPanel',
'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', 'debug_toolbar.panels.request.RequestPanel',
'debug_toolbar.panels.sql.SQLDebugPanel', 'debug_toolbar.panels.sql.SQLPanel',
'debug_toolbar.panels.signals.SignalDebugPanel', 'debug_toolbar.panels.signals.SignalsPanel',
'debug_toolbar.panels.logger.LoggingPanel', 'debug_toolbar.panels.logging.LoggingPanel',
'debug_toolbar_mongo.panel.MongoDebugPanel' 'debug_toolbar_mongo.panel.MongoDebugPanel'
'debug_toolbar.panels.profiling.ProfilingPanel',
# Enabling the profiler has a weird bug as of django-debug-toolbar==0.9.4 and
# Django=1.3.1/1.4 where requests to views get duplicated (your method gets
# hit twice). So you can uncomment when you need to diagnose performance
# problems, but you shouldn't leave it on.
# 'debug_toolbar.panels.profiling.ProfilingDebugPanel',
) )
# To see stacktraces for MongoDB queries, set this to True. # To see stacktraces for MongoDB queries, set this to True.
......
...@@ -46,27 +46,26 @@ MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',) ...@@ -46,27 +46,26 @@ MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',)
INTERNAL_IPS = ('127.0.0.1',) INTERNAL_IPS = ('127.0.0.1',)
DEBUG_TOOLBAR_PANELS = ( DEBUG_TOOLBAR_PANELS = (
'debug_toolbar.panels.version.VersionDebugPanel', 'debug_toolbar.panels.versions.VersionsPanel',
'debug_toolbar.panels.timer.TimerDebugPanel', 'debug_toolbar.panels.timer.TimerPanel',
'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel', 'debug_toolbar.panels.settings.SettingsPanel',
'debug_toolbar.panels.headers.HeaderDebugPanel', 'debug_toolbar.panels.headers.HeadersPanel',
'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', 'debug_toolbar.panels.request.RequestPanel',
'debug_toolbar.panels.sql.SQLDebugPanel', 'debug_toolbar.panels.sql.SQLPanel',
'debug_toolbar.panels.signals.SignalDebugPanel', 'debug_toolbar.panels.signals.SignalsPanel',
'debug_toolbar.panels.logger.LoggingPanel', 'debug_toolbar.panels.logging.LoggingPanel',
'debug_toolbar.panels.profiling.ProfilingPanel',
# Enabling the profiler has a weird bug as of django-debug-toolbar==0.9.4 and
# Django=1.3.1/1.4 where requests to views get duplicated (your method gets
# hit twice). So you can uncomment when you need to diagnose performance
# problems, but you shouldn't leave it on.
# 'debug_toolbar.panels.profiling.ProfilingPanel',
) )
DEBUG_TOOLBAR_CONFIG = { DEBUG_TOOLBAR_CONFIG = {
'INTERCEPT_REDIRECTS': False, 'SHOW_TOOLBAR_CALLBACK': 'cms.envs.devstack.should_show_debug_toolbar'
'SHOW_TOOLBAR_CALLBACK': lambda _: True,
} }
def should_show_debug_toolbar(_):
return True # We always want the toolbar on devstack regardless of IP, auth, etc.
# To see stacktraces for MongoDB queries, set this to True. # To see stacktraces for MongoDB queries, set this to True.
# Stacktraces slow down page loads drastically (for pages with lots of queries). # Stacktraces slow down page loads drastically (for pages with lots of queries).
DEBUG_TOOLBAR_MONGO_STACKTRACES = False DEBUG_TOOLBAR_MONGO_STACKTRACES = False
......
...@@ -19,18 +19,13 @@ INSTALLED_APPS += ('debug_toolbar',) ...@@ -19,18 +19,13 @@ INSTALLED_APPS += ('debug_toolbar',)
MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',) MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',)
DEBUG_TOOLBAR_PANELS = ( DEBUG_TOOLBAR_PANELS = (
'debug_toolbar.panels.version.VersionDebugPanel', 'debug_toolbar.panels.versions.VersionsPanel',
'debug_toolbar.panels.timer.TimerDebugPanel', 'debug_toolbar.panels.timer.TimerPanel',
'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel', 'debug_toolbar.panels.settings.SettingsPanel',
'debug_toolbar.panels.headers.HeaderDebugPanel', 'debug_toolbar.panels.headers.HeadersPanel',
'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', 'debug_toolbar.panels.request.RequestPanel',
'debug_toolbar.panels.sql.SQLDebugPanel', 'debug_toolbar.panels.sql.SQLPanel',
'debug_toolbar.panels.signals.SignalDebugPanel', 'debug_toolbar.panels.signals.SignalsPanel',
'debug_toolbar.panels.logger.LoggingPanel', 'debug_toolbar.panels.logging.LoggingPanel',
'debug_toolbar.panels.profiling.ProfilingPanel',
# Enabling the profiler has a weird bug as of django-debug-toolbar==0.9.4 and
# Django=1.3.1/1.4 where requests to views get duplicated (your method gets
# hit twice). So you can uncomment when you need to diagnose performance
# problems, but you shouldn't leave it on.
# 'debug_toolbar.panels.profiling.ProfilingDebugPanel',
) )
...@@ -235,26 +235,17 @@ MIDDLEWARE_CLASSES += ( ...@@ -235,26 +235,17 @@ MIDDLEWARE_CLASSES += (
INTERNAL_IPS = ('127.0.0.1',) INTERNAL_IPS = ('127.0.0.1',)
DEBUG_TOOLBAR_PANELS = ( DEBUG_TOOLBAR_PANELS = (
'debug_toolbar.panels.version.VersionDebugPanel', 'debug_toolbar.panels.versions.VersionsPanel',
'debug_toolbar.panels.timer.TimerDebugPanel', 'debug_toolbar.panels.timer.TimerPanel',
'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel', 'debug_toolbar.panels.settings.SettingsPanel',
'debug_toolbar.panels.headers.HeaderDebugPanel', 'debug_toolbar.panels.headers.HeadersPanel',
'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', 'debug_toolbar.panels.request.RequestPanel',
'debug_toolbar.panels.sql.SQLDebugPanel', 'debug_toolbar.panels.sql.SQLPanel',
'debug_toolbar.panels.signals.SignalDebugPanel', 'debug_toolbar.panels.signals.SignalsPanel',
'debug_toolbar.panels.logger.LoggingPanel', 'debug_toolbar.panels.logging.LoggingPanel',
'debug_toolbar.panels.profiling.ProfilingPanel',
# Enabling the profiler has a weird bug as of django-debug-toolbar==0.9.4 and
# Django=1.3.1/1.4 where requests to views get duplicated (your method gets
# hit twice). So you can uncomment when you need to diagnose performance
# problems, but you shouldn't leave it on.
# 'debug_toolbar.panels.profiling.ProfilingDebugPanel',
) )
DEBUG_TOOLBAR_CONFIG = {
'INTERCEPT_REDIRECTS': False
}
#################### FILE UPLOADS (for discussion forums) ##################### #################### FILE UPLOADS (for discussion forums) #####################
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
......
...@@ -57,20 +57,15 @@ MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',) ...@@ -57,20 +57,15 @@ MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',)
INTERNAL_IPS = ('127.0.0.1',) INTERNAL_IPS = ('127.0.0.1',)
DEBUG_TOOLBAR_PANELS = ( DEBUG_TOOLBAR_PANELS = (
'debug_toolbar.panels.version.VersionDebugPanel', 'debug_toolbar.panels.versions.VersionsPanel',
'debug_toolbar.panels.timer.TimerDebugPanel', 'debug_toolbar.panels.timer.TimerPanel',
'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel', 'debug_toolbar.panels.settings.SettingsPanel',
'debug_toolbar.panels.headers.HeaderDebugPanel', 'debug_toolbar.panels.headers.HeadersPanel',
'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', 'debug_toolbar.panels.request.RequestPanel',
'debug_toolbar.panels.sql.SQLDebugPanel', 'debug_toolbar.panels.sql.SQLPanel',
'debug_toolbar.panels.signals.SignalDebugPanel', 'debug_toolbar.panels.signals.SignalsPanel',
'debug_toolbar.panels.logger.LoggingPanel', 'debug_toolbar.panels.logging.LoggingPanel',
'debug_toolbar.panels.profiling.ProfilingPanel',
# Enabling the profiler has a weird bug as of django-debug-toolbar==0.9.4 and
# Django=1.3.1/1.4 where requests to views get duplicated (your method gets
# hit twice). So you can uncomment when you need to diagnose performance
# problems, but you shouldn't leave it on.
'debug_toolbar.panels.profiling.ProfilingDebugPanel',
) )
#PIPELINE = True #PIPELINE = True
...@@ -54,28 +54,27 @@ MIDDLEWARE_CLASSES = ( ...@@ -54,28 +54,27 @@ MIDDLEWARE_CLASSES = (
INTERNAL_IPS = ('127.0.0.1',) INTERNAL_IPS = ('127.0.0.1',)
DEBUG_TOOLBAR_PANELS = ( DEBUG_TOOLBAR_PANELS = (
'debug_toolbar.panels.version.VersionDebugPanel', 'debug_toolbar.panels.versions.VersionsPanel',
'debug_toolbar.panels.timer.TimerDebugPanel', 'debug_toolbar.panels.timer.TimerPanel',
'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel', 'debug_toolbar.panels.settings.SettingsPanel',
'debug_toolbar.panels.headers.HeaderDebugPanel', 'debug_toolbar.panels.headers.HeadersPanel',
'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', 'debug_toolbar.panels.request.RequestPanel',
'debug_toolbar.panels.sql.SQLDebugPanel', 'debug_toolbar.panels.sql.SQLPanel',
'debug_toolbar.panels.signals.SignalDebugPanel', 'debug_toolbar.panels.signals.SignalsPanel',
'debug_toolbar.panels.logger.LoggingPanel', 'debug_toolbar.panels.logging.LoggingPanel',
'debug_toolbar_mongo.panel.MongoDebugPanel', 'debug_toolbar_mongo.panel.MongoDebugPanel',
'debug_toolbar.panels.profiling.ProfilingPanel',
# Enabling the profiler has a weird bug as of django-debug-toolbar==0.9.4 and
# Django=1.3.1/1.4 where requests to views get duplicated (your method gets
# hit twice). So you can uncomment when you need to diagnose performance
# problems, but you shouldn't leave it on.
#'debug_toolbar.panels.profiling.ProfilingDebugPanel',
) )
DEBUG_TOOLBAR_CONFIG = { DEBUG_TOOLBAR_CONFIG = {
'INTERCEPT_REDIRECTS': False, 'SHOW_TOOLBAR_CALLBACK': 'lms.envs.devstack.should_show_debug_toolbar'
'SHOW_TOOLBAR_CALLBACK': lambda _: True,
} }
def should_show_debug_toolbar(_):
return True # We always want the toolbar on devstack regardless of IP, auth, etc.
########################### PIPELINE ################################# ########################### PIPELINE #################################
PIPELINE_SASS_ARGUMENTS = '--debug-info --require {proj_dir}/static/sass/bourbon/lib/bourbon.rb'.format(proj_dir=PROJECT_ROOT) PIPELINE_SASS_ARGUMENTS = '--debug-info --require {proj_dir}/static/sass/bourbon/lib/bourbon.rb'.format(proj_dir=PROJECT_ROOT)
......
...@@ -118,14 +118,8 @@ ipaddr==2.1.11 ...@@ -118,14 +118,8 @@ ipaddr==2.1.11
# Used to allow to configure CORS headers for cross-domain requests # Used to allow to configure CORS headers for cross-domain requests
django-cors-headers==0.13 django-cors-headers==0.13
# We've tried several times to update the debug toolbar to version 1.0.1, # Debug toolbar
# and had problems each time, resulting in us rolling back to 0.9.4. Before django_debug_toolbar==1.2.2
# submitting another pull request to do this update, check the following:
# * https://github.com/django-debug-toolbar/django-debug-toolbar/issues/535 should be resolved
# * Studio and CMS should both run correctly, both directly and via devstack
# * Check the Javascript console to be sure there are no Javascript errors
# related to the Django debug toolbar
django_debug_toolbar==0.9.4
django-debug-toolbar-mongo django-debug-toolbar-mongo
# Used for testing # Used for testing
......
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