This release features a change to use the shadow DOM. If a project is customizing the Django Debug Toolbar theme via variables a change will be required.
Changelog
- Updated to render the toolbar in a shadow DOM for better isolation from the rest of the page. This can be disabled with the setting
USE_SHADOW_DOM. - Note that custom themes overriding CSS variables on :root must move those overrides to
#djDebug, and custom panels that rely on external styles or DOM lookups reaching into the toolbar will need updates to work with the shadow DOM. - Prevent check from failing when
ROOT_URLCONFis not defined. - Prevent toolbar storage from failing when serialized panel data contains mapping keys that are not JSON-compatible.
- Prevent debounce race conditions in the history panel for rapid fetch requests.
- Added a note to the prerequisites section of the installation docs about requiring an up-to-date browser.
- Dropped support for Django 4.2 and Django 5.1 .
- Added graceful degradation for SQL queries that exceed sqlparse's token limits. When
SQLParseErroris raised, the SQL panel now automatically disables grouping and retries formatting, preventing crashes with large queries. - Upgraded the JavaScript code to use modern ECMAScript features using
esupgrade. - Updated tox configuration to treat
DeprecationWarning,ResourceWarning, andPendingDeprecationWarningas errors. - Clarified configuration documentation about
SHOW_TOOLBAR_CALLBACKneeding to respectdjango.conf.settings.DEBUGto matchdebug_toolbar_urls. - Fixed cookie
expirescalculation indjdt.cookie.set. - Account for the new
CULL_PROBABILITYin Django 6.2 in tests. - Support Django 6.2's handling of booleans for non-PostgreSQL databases.
- Changed the SQL panel to show the "Select" and "Explain" action buttons for all queries, not just
SELECTstatements. - Fixed SQL panel handling of binary parameters (e.g. from
BinaryField) and GeoDjango PostGIS geometry parameters. EWKB geometry adapters are now serialized and reconstructed so that Select and Explain work correctly on spatial queries.
What's Changed
- Prevent check from erroring when
ROOT_URLCONFis not defined by @scott-8 in #2342 - Add browser based JavaScript via vitest by @codingjoe in #2348
- Exclude package-lock.json from pre-commit autoformatting by @matthiask in #2355
- Resolve debounce race condition by @codingjoe in #2356
- Refs #2356: Add a note to the prerequisites section about requiring a modern browser by @matthiask in #2357
- Add contribution documentation on running JS tests by @federicobond in #2359
- Drop support for Django 4.2 and Django 5.1 . by @p-r-a-v-i-n in #2360
- Drop Promise.try and change documented Baseline target to Widely-Available by @codingjoe in #2361
- Use shadow dom to render the toolbar by @federicobond in #2266
- Add graceful degradation for large SQL queries by @kkm-horikawa in #2291
- Update the version for biome schema. by @tim-schilling in #2364
- Update JS syntax to Baseline 2025 using esupgrade by @codingjoe in #2346
- Treat some warnings as errors in CI by @tim-schilling in #2258
- Export getDebugElement utility javascript function. by @tim-schilling in #2373
- Clarified configuration documentation about SHOW_TOOLBAR_CALLBACK by @tim-schilling in #2372
- Handle non-JSON mapping keys in toolbar storage by @puneetdixit200 in #2376
- Fixed cookie expires calculation by @leduythuccs in #2377
- Handle cache culling and boolean lookup changes in Django 6.2 by @tim-schilling in #2385
- Change the SQL panel to show the select and explain buttons for all queries by @matthiask in #2393
- Mention @gzip_page explicitly as a reason why the toolbar doesn't show up by @matthiask in #2392
- Fix binary parameter handling in SQL panel by @matthiask in #2391
- Version 7.0.0 by @tim-schilling in #2386
New Contributors
- @scott-8 made their first contribution in #2342
- @kkm-horikawa made their first contribution in #2291
- @puneetdixit200 made their first contribution in #2376
- @leduythuccs made their first contribution in #2377
Full Changelog: 6.3.0...7.0.0