From 124133bb600d482f43df02a6274b83318ebb40a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sacawa?= Date: Thu, 5 Aug 2021 13:23:44 -0400 Subject: [PATCH 1/3] Add: response status to HistoryPanel --- debug_toolbar/panels/history/panel.py | 1 + debug_toolbar/templates/debug_toolbar/panels/history.html | 1 + debug_toolbar/templates/debug_toolbar/panels/history_tr.html | 3 +++ 3 files changed, 5 insertions(+) diff --git a/debug_toolbar/panels/history/panel.py b/debug_toolbar/panels/history/panel.py index 0cc352e8b..541c59136 100644 --- a/debug_toolbar/panels/history/panel.py +++ b/debug_toolbar/panels/history/panel.py @@ -68,6 +68,7 @@ def generate_stats(self, request, response): { "request_url": request.get_full_path(), "request_method": request.method, + "status_code": response.status_code, "data": data, "time": timezone.now(), } diff --git a/debug_toolbar/templates/debug_toolbar/panels/history.html b/debug_toolbar/templates/debug_toolbar/panels/history.html index f5e967a17..84c6cb5bd 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/history.html +++ b/debug_toolbar/templates/debug_toolbar/panels/history.html @@ -10,6 +10,7 @@ {% trans "Method" %} {% trans "Path" %} {% trans "Request Variables" %} + {% trans "Status" %} {% trans "Action" %} diff --git a/debug_toolbar/templates/debug_toolbar/panels/history_tr.html b/debug_toolbar/templates/debug_toolbar/panels/history_tr.html index 9ce984396..31793472a 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/history_tr.html +++ b/debug_toolbar/templates/debug_toolbar/panels/history_tr.html @@ -38,6 +38,9 @@ + +

{{ store_context.toolbar.stats.HistoryPanel.status_code|escape }}

+
{{ store_context.form }} From e020c2161c9bbe9fd5417a0e1a63a258933d6364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sacawa?= Date: Sat, 7 Aug 2021 10:43:16 -0400 Subject: [PATCH 2/3] Doc: update docs/changes.rst --- docs/changes.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changes.rst b/docs/changes.rst index e8c7f35cf..3d7369e57 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -10,6 +10,7 @@ Next version running with multiple processes. * Fixed ``RENDER_PANELS`` functionality so that when ``True`` panels are rendered during the request and not loaded asynchronously. +* HistoryPanel now shows status codes of reponses. 3.2.1 (2021-04-14) From 0813f4ba86a25775d99169586497d30440e7d7e7 Mon Sep 17 00:00:00 2001 From: tschilling Date: Mon, 9 Aug 2021 20:00:57 -0500 Subject: [PATCH 3/3] Correct spelling to please the CI. --- docs/changes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changes.rst b/docs/changes.rst index 3d7369e57..6ffe838c4 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -10,7 +10,7 @@ Next version running with multiple processes. * Fixed ``RENDER_PANELS`` functionality so that when ``True`` panels are rendered during the request and not loaded asynchronously. -* HistoryPanel now shows status codes of reponses. +* HistoryPanel now shows status codes of responses. 3.2.1 (2021-04-14)