Skip to content

Commit fbfbd8d

Browse files
committed
setup preliminary tasks panel logic
1 parent 62ef502 commit fbfbd8d

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

debug_toolbar/panels/tasks.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from django.utils.translation import gettext_lazy as _
2+
3+
from debug_toolbar.panels import Panel
4+
5+
6+
class TasksPanel(Panel):
7+
"""
8+
Panel that displays Django tasks queued or executed during the
9+
processing of the request.
10+
"""
11+
12+
title = _("Tasks")
13+
template = "debug_toolbar/panels/tasks.html"
14+
15+
is_async = True

debug_toolbar/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def get_config():
8181
"debug_toolbar.panels.cache.CachePanel",
8282
"debug_toolbar.panels.signals.SignalsPanel",
8383
"debug_toolbar.panels.community.CommunityPanel",
84+
"debug_toolbar.panels.tasks.TasksPanel",
8485
"debug_toolbar.panels.redirects.RedirectsPanel",
8586
"debug_toolbar.panels.profiling.ProfilingPanel",
8687
]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<table>
2+
<thead>
3+
<tr>
4+
<th>Task Info</th>
5+
</tr>
6+
</thead>
7+
<tbody>
8+
{% for task in tasks %}
9+
<tr>
10+
<td>{{ task }}</td>
11+
</tr>
12+
{% endfor %}
13+
</tbody>
14+
</table>

0 commit comments

Comments
 (0)