I wrote a query history panel for the Django Debug toolbar , which can be added to the Django Debug toolbar to view non-current requests (including AJAX requests).
Install via pip:
pip install git+https:
In settings.py add 'ddt_request_history.panels.request_history.RequestHistoryPanel' to DEBUG_TOOLBAR_PANELS for example:
DEBUG_TOOLBAR_PANELS = [ 'ddt_request_history.panels.request_history.RequestHistoryPanel', # Here it is '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.templates.TemplatesPanel', 'debug_toolbar.panels.staticfiles.StaticFilesPanel', 'debug_toolbar.panels.cache.CachePanel', 'debug_toolbar.panels.signals.SignalsPanel', 'debug_toolbar.panels.logging.LoggingPanel', 'debug_toolbar.panels.redirects.RedirectsPanel', 'debug_toolbar.panels.profiling.ProfilingPanel', ]
To record ajax requests, redefine SHOW_TOOLBAR_CALLBACK in DEBUG_TOOLBAR_CONFIG (also in settings.py ), for example:
DEBUG_TOOLBAR_CONFIG = { 'SHOW_TOOLBAR_CALLBACK': 'ddt_request_history.panels.request_history.allow_ajax', }
djsutho Jul 29 '14 at 14:13 2014-07-29 14:13
source share