Skip to main content

Update: History is now built into Django Debug Toolbar

Since version 3.0 of Django Debug Toolbar a built in history panel is available. More details can be found in this PR and the docs. As this functionality is being provided by the toolbar itself there will likely not be any further updates to this project (though if there are good reasons for an exception like supporting older versions of the toolbar it will be considered). Thanks to all those who've contributed to and used this project.

Request History Panel for Django Debug Toolbar

Adds a request history panel to Django Debug Toolbar for viewing stats for different requests (with the option for ajax support).

Install

pip install django-debug-toolbar-request-history

Then add the panel to DEBUG_TOOLBAR_PANELS (see the config section for more details).

Note: only Django Debug Toolbar versions 2.0 and higher are now supported. For older versions try:

pip install django-debug-toolbar-request-history==0.0.11

or for the development version:

pip install -e git+https://github.com/djsutho/django-debug-toolbar-request-history.git#egg=django-debug-toolbar-request-history

Usage

  • Click on the "Request History" panel in the toolbar to load the available requests
  • Click on the request you are interested in (on the "Time" or "Path" part of the request) to load the toolbar for that request

Notes

Due to django-debug-toolbar reliance on thread-local:

  • currently requests do not survive server reload, therefore, when using the dev server old requests will not be available after a code change is loaded
  • if you get inconsistent request history each time you click on the panel, lower your server threads to 1

Config (in settings.py)

To DEBUG_TOOLBAR_PANELS add 'ddt_request_history.panels.request_history.RequestHistoryPanel' e.g.:

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 change the number of stored requests add RESULTS_STORE_SIZE to DEBUG_TOOLBAR_CONFIG e.g.:

DEBUG_TOOLBAR_CONFIG = {
    'RESULTS_STORE_SIZE': 100,
}

TODO

  • Clean-up
  • Change the storage to survive server reloads (maybe use cache or session).
  • Add tests

Metadata

Release files for django-debug-toolbar-request-history 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for django-debug-toolbar-request-history 0.1.4
File Interpreter ABI Platform Actions
django_debug_toolbar_request_history-0.1.4-py2.py3-none-any.whl Python 3, Python 2 none any Details for django_debug_toolbar_request_history-0.1.4-py2.py3-none-any.whl

Release files / django_debug_toolbar_request_history-0.1.4-py2.py3-none-any.whl

Download URL django_debug_toolbar_request_history-0.1.4-py2.py3-none-any.whl
Size 8.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
753ebed8b88dc8f71a8920cac5d69be18d56f510b25f841c877413c4549a2733
BLAKE2b-256 checksum
How to use checksums
a71c72a4403fc9b320dbb51f5912fc4025cbc8fd946211a3eacc7fe7ca0a69c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3

Security for django-debug-toolbar-request-history 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page