File tree Expand file tree Collapse file tree 13 files changed +113
-18
lines changed Expand file tree Collapse file tree 13 files changed +113
-18
lines changed Original file line number Diff line number Diff line change 2424 - name : Build a binary wheel and a source tarball
2525 run : python3 -m build
2626 - name : Store the distribution packages
27- uses : actions/upload-artifact@v4
27+ uses : actions/upload-artifact@v5
2828 with :
2929 name : python-package-distributions
3030 path : dist/
4343 id-token : write # IMPORTANT: mandatory for trusted publishing
4444 steps :
4545 - name : Download all the dists
46- uses : actions/download-artifact@v5
46+ uses : actions/download-artifact@v6
4747 with :
4848 name : python-package-distributions
4949 path : dist/
@@ -64,12 +64,12 @@ jobs:
6464
6565 steps :
6666 - name : Download all the dists
67- uses : actions/download-artifact@v5
67+ uses : actions/download-artifact@v6
6868 with :
6969 name : python-package-distributions
7070 path : dist/
7171 - name : Sign the dists with Sigstore
72- uses : sigstore/gh-action-sigstore-python@v3.0.1
72+ uses : sigstore/gh-action-sigstore-python@v3.1.0
7373 with :
7474 inputs : >-
7575 ./dist/*.tar.gz
@@ -109,7 +109,7 @@ jobs:
109109
110110 steps :
111111 - name : Download all the dists
112- uses : actions/download-artifact@v5
112+ uses : actions/download-artifact@v6
113113 with :
114114 name : python-package-distributions
115115 path : dist/
Original file line number Diff line number Diff line change 1414 hooks :
1515 - id : doc8
1616- repo : https://github.com/adamchainz/django-upgrade
17- rev : 1.29.0
17+ rev : 1.29.1
1818 hooks :
1919 - id : django-upgrade
2020 args : [--target-version, "4.2"]
@@ -29,18 +29,18 @@ repos:
2929 - id : rst-backticks
3030 - id : rst-directive-colons
3131- repo : https://github.com/biomejs/pre-commit
32- rev : v2.2.5
32+ rev : v2.3.1
3333 hooks :
3434 - id : biome-check
3535 verbose : true
3636- repo : https://github.com/astral-sh/ruff-pre-commit
37- rev : ' v0.14.0 '
37+ rev : ' v0.14.2 '
3838 hooks :
3939 - id : ruff
4040 args : [--fix, --exit-non-zero-on-fix]
4141 - id : ruff-format
4242- repo : https://github.com/tox-dev/pyproject-fmt
43- rev : v2.10 .0
43+ rev : v2.11 .0
4444 hooks :
4545 - id : pyproject-fmt
4646- repo : https://github.com/abravalheri/validate-pyproject
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ Here's a screenshot of the toolbar in action:
4040In addition to the built-in panels, a number of third-party panels are
4141contributed by the community.
4242
43- The current stable version of the Debug Toolbar is 6.0 .0. It works on
43+ The current stable version of the Debug Toolbar is 6.1 .0. It works on
4444Django ≥ 4.2.0.
4545
4646The Debug Toolbar has experimental support for `Django's asynchronous views
Original file line number Diff line number Diff line change 44
55# Do not use pkg_resources to find the version but set it here directly!
66# see issue #1446
7- VERSION = "6.0 .0"
7+ VERSION = "6.1 .0"
88
99# Code that discovers files or modules in INSTALLED_APPS imports this module.
1010urls = "debug_toolbar.urls" , APP_NAME
Original file line number Diff line number Diff line change @@ -24,6 +24,35 @@ def ready(self):
2424 # allows panels like CachePanel to enable their instrumentation immediately.
2525 for cls in DebugToolbar .get_panel_classes ():
2626 cls .ready ()
27+ _manage_migrations_visibility (self .name )
28+
29+ def import_models (self ):
30+ """
31+ Override import models to avoid allowing users to dynamically fetch a model
32+ that doesn't have a table behind it unless they are using the DatabaseStore.
33+ This also prevents the command `migrate --run-syncdb` from creating tables
34+ for the models.
35+ """
36+ dt_config = dt_settings .get_config ()
37+ if dt_config ["TOOLBAR_STORE_CLASS" ] == "debug_toolbar.store.DatabaseStore" :
38+ return super ().import_models ()
39+ # Not using the database store, don't import the models
40+ self .models = {}
41+
42+
43+ def _manage_migrations_visibility (app_name ):
44+ """
45+ Adjust the toolbar's migration visibility by manipulating the
46+ project's settings.
47+
48+ This is a hack since it's manipulating settings.
49+ """
50+ if (
51+ dt_settings .get_config ()["TOOLBAR_STORE_CLASS" ]
52+ != "debug_toolbar.store.DatabaseStore"
53+ ):
54+ # This effectively hides the migrations by telling Django they don't exist.
55+ settings .MIGRATION_MODULES .setdefault (app_name , None )
2756
2857
2958def check_template_config (config ):
Original file line number Diff line number Diff line change @@ -85,3 +85,5 @@ Problematic Parts
8585 fully compatible and currently being worked on. For now, these panels
8686 are disabled by default when running in async environment.
8787 follow the progress of this issue in `Async compatible toolbar project <https://github.com/orgs/jazzband/projects/9 >`_.
88+ - Django Channels incompatibility: The toolbar does not currently support
89+ Django Channels' consumers due to the difference in middleware design.
Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ Change log
44Pending
55-------
66
7+ 6.1.0 (2025-10-30)
8+ ------------------
9+
710* Added support for async to timer panel.
811* Added a note about the default password in ``make example ``.
912* Removed logging about the toolbar failing to serialize a value into JSON.
@@ -21,6 +24,12 @@ Pending
2124* Updated logic that forces values to strings (``force_str ``) to render
2225 "Django Debug Toolbar was unable to parse value." when there's a decoding
2326 error.
27+ * Updated docs to show incompatibility with Django Channels.
28+ * Hide the toolbar's migrations unless ``debug_toolbar.store.DatabaseStore ``
29+ is being used. This may change in the future.
30+ * Hide ``debug_toolbar.HistoryEntry `` as a model unless
31+ ``debug_toolbar.store.DatabaseStore `` is being used. This may change in the
32+ future.
2433
25346.0.0 (2025-07-22)
2635------------------
Original file line number Diff line number Diff line change 2525copyright = copyright .format (datetime .date .today ().year )
2626
2727# The full version, including alpha/beta/rc tags
28- release = "6.0 .0"
28+ release = "6.1 .0"
2929
3030
3131# -- General configuration ---------------------------------------------------
Original file line number Diff line number Diff line change @@ -196,15 +196,15 @@ Toolbar options
196196 The DatabaseStore provides persistence and automatically cleans up old
197197 entries based on the ``RESULTS_CACHE_SIZE `` setting.
198198
199- Note: For full functionality, DatabaseStore requires migrations for
200- the debug_toolbar app:
199+ Note: When using `` DatabaseStore `` migrations are required for
200+ the `` debug_toolbar `` app:
201201
202202 .. code-block :: bash
203203
204204 python manage.py migrate debug_toolbar
205205
206- For the DatabaseStore to work properly, you need to run migrations for the
207- debug_toolbar app. The migrations create the necessary database table to store
206+ For the `` DatabaseStore `` to work properly, you need to run migrations for the
207+ `` debug_toolbar `` app. The migrations create the necessary database table to store
208208 toolbar data.
209209
210210.. _TOOLBAR_LANGUAGE :
Original file line number Diff line number Diff line change @@ -273,12 +273,13 @@ And for Apache:
273273Django Channels & Async
274274^^^^^^^^^^^^^^^^^^^^^^^
275275
276- The Debug Toolbar currently has experimental support for Django Channels and
277- async projects. The Debug Toolbar is compatible with the following exceptions:
276+ The Debug Toolbar currently has experimental support for async projects.
277+ The Debug Toolbar is compatible with the following exceptions:
278278
279279- Concurrent requests aren't supported
280280- ``TimerPanel ``, ``RequestPanel `` and ``ProfilingPanel `` can't be used
281281 in async contexts.
282+ - Django Channels is not supported yet.
282283
283284HTMX
284285^^^^
You can’t perform that action at this time.
0 commit comments