chore(deps-dev): bump django-debug-toolbar from 3.2.1 to 6.0.0
Bumps django-debug-toolbar from 3.2.1 to 6.0.0.
Release notes
Sourced from django-debug-toolbar's releases.
6.0.0
Description
The v6.0.0 release of Django Debug Toolbar significantly revamps how panels for the toolbar work. Each panel will now persist its data in a store. A store can either be backed by various backends. The toolbar will support a memory and database backend to start.
The toolbar is now using Django's
SafeExceptionReporterFilter.cleanse_setting()function to filter out sensitive information. Some data will be replaced with"********************". This is because the toolbar could be configured to write the request information to a persistent store such as a cache or database.Django applications with basic installations are backwards compatible with this change. If there are hooks into the internals of the toolbar, such as
DebugToolbar.store_idthen it will be backwards incompatible.Third-party panels will need updating. Any data that is stored in
record_statswill need to be fetched back out fromself.get_stats()before being able to be rendered. This is to support loading an instance of the toolbar from persisted data. A simple example of this transition can be found indebug_toolbar/panels/cache.pyin PR 2138How to upgrade
- Changes required if the toolbar isn't installed entirely programmatically
- If you experience
RuntimeError: Model class debug_toolbar.models.HistoryEntry doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS, you need to remove the reference to the toolbar's urls in yoururls.pyfile andMIDDLEWAREsetting when the toolbar isn't inINSTALLED_APPS- If you have a custom panel, you'll need to adjust
record_statsand useself.get_stats()to fetch data for rendering- If you'd like to use the database store, see
TOOLBAR_STORE_CLASSfor more infoWhy did the internals change?
The Django Debug Toolbar is a popular package we did not want to block the community from pursuing the async path for Django applications. Writing the request data to a store better positions the toolbar for async projects. It also opens the door for it being usable in production as well with API integrations.
What's Changed
- Log serialization warning when a panel errors. by
@tim-schillingin django-commons/django-debug-toolbar#1810- Improve clarity of record_stats for serialization. by
@tim-schillingin django-commons/django-debug-toolbar#1965- Update serializable branch with main by
@tim-schillingin django-commons/django-debug-toolbar#2072- Remove pin for django-csp. by
@tim-schillingin django-commons/django-debug-toolbar#2132- Fixes #2073 -- Added DatabaseStore for persistent debug data storage. by
@dr-rompecabezasin django-commons/django-debug-toolbar#2121- Disabled document.cookie linter by
@tim-schillingin django-commons/django-debug-toolbar#2139- Added check for pytest as test runner for IS_RUNNING_TESTS. by
@tim-schillingin django-commons/django-debug-toolbar#2137- Remove Type Hints from CspRenderingTestCase by
@andoriyaprashantin django-commons/django-debug-toolbar#2144- Add show_toolbar_with_docker function for Docker IP handling by
@matthiaskin django-commons/django-debug-toolbar#2153- Support serializable toolbar by
@tim-schillingin django-commons/django-debug-toolbar#2138- Deduplicate staticfiles by
@matthiaskin django-commons/django-debug-toolbar#2155- Fixes #2158 -- Made static file objects orderable by
@matthiaskin django-commons/django-debug-toolbar#2161- Fixes #2160 -- Corrected links to static files by
@matthiaskin django-commons/django-debug-toolbar#2162- Fixes #2151 -- Forwarded args and kwargs in URLMixin.url by
@matthiaskin django-commons/django-debug-toolbar#2163- Fixes #2159 -- Do not HTML-escape traces in the cache and profiling panel by
@matthiaskin django-commons/django-debug-toolbar#2164Full Changelog: https://github.com/django-commons/django-debug-toolbar/compare/5.2.0...6.0.0
Acknowlegements
Thank you to all the contributors who made this release possible. Thank you to
@robhudson,@matthiask,@tim-schilling,@salty-ivyand@dr-rompecabezasfor their support, development and reviews of the serializable toolbar changes. A special shout-out to@matthiaskfor leading the Djangonaut Space Session 4 team of@dr-rompecabezas,@andoriyaprashantand@blingblin-g.5.2.0
What's Changed
- Enhance RedirectsPanel with customizable redirect response hook by
@blingblin-gin django-commons/django-debug-toolbar#2104- Sanitize sensitive variables in RequestPanel by
@dr-rompecabezasin django-commons/django-debug-toolbar#2105- [pre-commit.ci] pre-commit autoupdate by
@pre-commit-ciin django-commons/django-debug-toolbar#2112
... (truncated)
Changelog
Sourced from django-debug-toolbar's changelog.
6.0.0 (2025-07-22)
- Added support for checking if pytest as the test runner when determining if tests are running.
- Added
show_toolbar_with_dockerfunction to check Docker host IP address when running inside Docker containers.- Defines the
BaseStoreinterface for request storage mechanisms.- Added the setting
TOOLBAR_STORE_CLASSto configure the request storage mechanism. Defaults todebug_toolbar.store.MemoryStore.- Rename
store_idproperties torequest_idandToolbar.storetoToolbar.init_store.- Support
Panelinstances with stored stats viaPanel.load_stats_from_store.- Swapped
Toolbar._storefor theget_store()class.- Created a
StoredDebugToolbarthat support creating an instance of the toolbar representing an old request. It should only be used for fetching panels' contents.- Drop
raw_paramsfrom query data.- Queries now have a unique
djdt_query_id. The SQL forms now reference this id and avoid passing SQL to be executed.- Move the formatting logic of SQL queries to just before rendering in
SQLPanel.content.- Make
Panel.panel_ida class member.- Update all panels to utilize data from
Panel.get_stats()to load content to render. Specifically forPanel.titleandPanel.nav_title.- Extend example app to contain an async version.
- Added
debug_toolbar.store.DatabaseStorefor persistent debug data storage.- Deduplicated static files in the staticfiles panel.
5.2.0 (2025-04-29)
- Added hook to RedirectsPanel for subclass customization.
- Added feature to sanitize sensitive data in the Request Panel.
- Fixed dark mode conflict in code block toolbar CSS.
- Properly allowed overriding the system theme preference by using the theme selector. Removed the
DEFAULT_THEMEsetting, we should always default to system-level defaults where possible.- Added support for using django-template-partials with the template panel's source view functionality. The same change possibly adds support for other template loaders.
- Introduced
djade <https://github.com/adamchainz/djade>__ to format Django templates.- Swapped display order of panel header and close button to prevent style conflicts
- Added CSS for resetting the height of elements too to avoid problems with global CSS of a website where the toolbar is used.
... (truncated)
Commits
4e47b94Version 6.0.008a110eFixes #2159 -- Do not HTML-escape traces in the cache and profiling panelb40dd8aFixes 2151 -- Forwarded args and kwargs in URLMixin.url (#2163)cda2553Fixes #2160 -- Corrected links to static files (#2162)569528bFixes #2158 -- Made static file objects orderable (#2161)8ee45ed[pre-commit.ci] pre-commit autoupdateafd5e7eDeduplicate staticfiles (#2155)9ee6c20Merge remote-tracking branch 'origin/serializable'afcc4e1[pre-commit.ci] pre-commit autoupdate (#2154)2fafbb4Merge branch 'main' into serializable- Additional commits viewable in compare view
You can trigger a rebase of this PR by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Note Automatic rebases have been disabled on this pull request as it has been open for over 30 days.