Skip to content

Commit 9a81958

Browse files
authored
Make Panels non async by default (#1990)
* make panel non async by default
1 parent 940fd22 commit 9a81958

File tree

13 files changed

+18
-8
lines changed

13 files changed

+18
-8
lines changed

debug_toolbar/panels/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Panel:
1010
Base class for panels.
1111
"""
1212

13-
is_async = True
13+
is_async = False
1414

1515
def __init__(self, toolbar, get_response):
1616
self.toolbar = toolbar

debug_toolbar/panels/alerts.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ class AlertsPanel(Panel):
7676

7777
title = _("Alerts")
7878

79+
is_async = True
80+
7981
template = "debug_toolbar/panels/alerts.html"
8082

8183
def __init__(self, *args, **kwargs):

debug_toolbar/panels/cache.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ class CachePanel(Panel):
5858

5959
template = "debug_toolbar/panels/cache.html"
6060

61+
is_async = True
62+
6163
_context_locals = Local()
6264

6365
def __init__(self, *args, **kwargs):

debug_toolbar/panels/headers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ class HeadersPanel(Panel):
3030

3131
title = _("Headers")
3232

33+
is_async = True
34+
3335
template = "debug_toolbar/panels/headers.html"
3436

3537
def process_request(self, request):

debug_toolbar/panels/redirects.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ class RedirectsPanel(Panel):
1111
Panel that intercepts redirects and displays a page with debug info.
1212
"""
1313

14-
is_async = True
1514
has_content = False
1615

16+
is_async = True
17+
1718
nav_title = _("Intercept redirects")
1819

1920
def _process_response(self, response):

debug_toolbar/panels/request.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ class RequestPanel(Panel):
1515

1616
title = _("Request")
1717

18-
is_async = False
19-
2018
@property
2119
def nav_subtitle(self):
2220
"""

debug_toolbar/panels/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ class SettingsPanel(Panel):
1414

1515
template = "debug_toolbar/panels/settings.html"
1616

17+
is_async = True
18+
1719
nav_title = _("Settings")
1820

1921
def title(self):

debug_toolbar/panels/signals.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
class SignalsPanel(Panel):
2929
template = "debug_toolbar/panels/signals.html"
3030

31+
is_async = True
32+
3133
SIGNALS = {
3234
"request_started": request_started,
3335
"request_finished": request_finished,

debug_toolbar/panels/staticfiles.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ class StaticFilesPanel(panels.Panel):
7373
A panel to display the found staticfiles.
7474
"""
7575

76-
is_async = False
7776
name = "Static files"
7877
template = "debug_toolbar/panels/staticfiles.html"
7978

debug_toolbar/panels/templates/panel.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ class TemplatesPanel(Panel):
6868
A panel that lists all templates used during processing of a response.
6969
"""
7070

71+
is_async = True
72+
7173
def __init__(self, *args, **kwargs):
7274
super().__init__(*args, **kwargs)
7375
self.templates = []

0 commit comments

Comments
 (0)