Skip to content

Releases: django-commons/django-debug-toolbar

7.0.0

19 Jun 00:21

Choose a tag to compare

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_URLCONF is 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 SQLParseError is 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, and PendingDeprecationWarning as errors.
  • Clarified configuration documentation about SHOW_TOOLBAR_CALLBACK needing to respect django.conf.settings.DEBUG to match debug_toolbar_urls.
  • Fixed cookie expires calculation in djdt.cookie.set.
  • Account for the new CULL_PROBABILITY in 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 SELECT statements.
  • 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

New Contributors

Full Changelog: 6.3.0...7.0.0

6.3.0

02 Apr 16:07

Choose a tag to compare

What's Changed

Changelog from docs:

  • Replaced requirements_dev.txt file for pyproject.toml support with dependency groups.
  • Updated ReadTheDocs Python version to 3.13.
  • Modernize some panel styles and colors.
  • Standardize use of time/duration units and labels across panels.
  • Added translations for Lithuanian, Turkish and Uzbek.
  • Update the translations.
  • Expose a py.typed marker file.
  • Updated RedirectsPanel to emit the deprecation warning when it’s used rather than on instantiation.
  • Highlighted the documentation about disabling the browser’s caching to ensure the latest static assets are used.
  • Fixed bug with CachePanel so the cache patching is only applied once.
  • Added debug_toolbar.store.CacheStore for storing toolbar data using Django’s cache framework. This provides persistence without requiring database migrations, and works with any cache backend (Memcached, Redis, database, file-based, etc.).
  • Added CACHE_BACKEND and CACHE_KEY_PREFIX settings to configure the CacheStore.

New Contributors

Full Changelog: 6.2.0...6.3.0

6.2.0

20 Jan 12:38
6.2.0
0b7c8d8

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 6.1.0...6.2.0

6.1.0

30 Oct 19:50

Choose a tag to compare

What's Changed

See change log here

Commits:

New Contributors

Full Changes: 6.0.0...6.1.0

6.0.0

25 Jul 13:12

Choose a tag to compare

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_id then it will be backwards incompatible.

Third-party panels will need updating. Any data that is stored in record_stats will need to be fetched back out from self.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 in debug_toolbar/panels/cache.py in PR 2138

How 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 your urls.py file and MIDDLEWARE setting when the toolbar isn't in INSTALLED_APPS
  • If you have a custom panel, you'll need to adjust record_stats and use self.get_stats() to fetch data for rendering
  • If you'd like to use the database store, see TOOLBAR_STORE_CLASS for more info

Why 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

Full Changelog: 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-ivy and @dr-rompecabezas for their support, development and reviews of the serializable toolbar changes. A special shout-out to @matthiask for leading the Djangonaut Space Session 4 team of @dr-rompecabezas, @andoriyaprashant and @blingblin-g.

5.2.0

29 Apr 05:25
5.2.0
e5f0ccd

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 5.1.0...5.2.0

5.1.0

20 Mar 16:17
5.1.0
0d7b859

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 5.0.1...5.1.0

5.0.1

14 Jan 02:39
345b760

Choose a tag to compare

What's Changed

There were no functional changes in this version.

PRs

Full Changelog: 5.0.0...5.0.1

5.0.0

11 Jan 16:28
0e55ae7

Choose a tag to compare

What's Changed

Please note that Django Debug Toolbar has now moved into the Django Commons organization.

Changelog

  • Added Python 3.13 to the CI matrix.
  • Removed support for Python 3.8 as it has reached end of life.
  • Converted to Django Commons PyPI release process.
  • Fixed a crash which occurred when using non-str static file values.
  • Documented experimental async support.
  • Improved troubleshooting doc for incorrect mime types for .js static files
  • Support async applications and ASGI from
    Google Summer of Code Project 2024 <https://summerofcode.withgoogle.com/programs/2024/projects/iXVvyGYp>__.
  • Added Django 5.1 to the CI matrix.
  • Added support for the LoginRequiredMiddleware introduced in Django 5.1.
  • Support select and explain buttons for UNION queries on PostgreSQL.
  • Fixed internal toolbar requests being instrumented if the Django setting
    FORCE_SCRIPT_NAME was set.
  • Increase opacity of show Debug Toolbar handle to improve accessibility.
  • Changed the RedirectsPanel to be async compatible.
  • Increased the contrast of text with dark mode enabled.
  • Add translations for Bulgarian and Korean.
  • Update translations for several languages.
  • Include new translatable strings for translation.
  • Fixed a crash which happened in the fallback case when session keys cannot be
    sorted.

PRs

Google Summer of Code - Async project

This release contains the changes for async compatibility for the majority of panels. This is the result of the Google Summer of Code project by @salty-ivy. A massive thank you 💚 and a round of applause 👏 is due to Aman!

New Contributors

Full Changelog: 4.4.6...5.0.0

5.0.0-alpha

02 Sep 00:58
e9ba829

Choose a tag to compare

Why 5.0 and why alpha?

Version 5.0 does not contain any backwards incompatible changes. Instead it should be more compatible with async Django projects. However, the change did require some reasonably sized changes to the middleware. This is a large enough change that we wanted it to be effectively communicated to users of the toolbar.

This release is an alpha because the async logic was tested, but we also understand that we haven't tested it in every scenario. We fully expect the project to continue to function extremely well in WSGI applications. For ASGI applications that are utilizing async, well, that's why it's an alpha 😁

What's Changed

New Contributors

Google Summer of Code - Async project

This release contains the changes for async compatibility for the majority of panels. This is the result of the Google Summer of Code project by @salty-ivy. A massive thank you 💚 and a round of applause 👏 is due to Aman!

Full Changelog: 4.4.6...5.0.0-alpha