From 9efda5803b0226efab27f0f8c6ab06fbb0656d3a Mon Sep 17 00:00:00 2001
From: andoriyaprashant
Date: Wed, 2 Apr 2025 23:49:02 +0530
Subject: [PATCH 1/3] Added Community panel
---
debug_toolbar/panels/community.py | 13 +++++
debug_toolbar/settings.py | 1 +
.../debug_toolbar/panels/community.html | 47 +++++++++++++++++++
docs/changes.rst | 1 +
4 files changed, 62 insertions(+)
create mode 100644 debug_toolbar/panels/community.py
create mode 100644 debug_toolbar/templates/debug_toolbar/panels/community.html
diff --git a/debug_toolbar/panels/community.py b/debug_toolbar/panels/community.py
new file mode 100644
index 000000000..562584ca9
--- /dev/null
+++ b/debug_toolbar/panels/community.py
@@ -0,0 +1,13 @@
+from debug_toolbar.panels import Panel
+from django.utils.translation import gettext_lazy as _
+
+class CommunityPanel(Panel):
+ """
+ A panel that provides links to the Django Debug Toolbar community.
+ """
+
+ title = _("Community")
+ template = "debug_toolbar/panels/community.html"
+
+ def nav_title(self):
+ return _("Community")
diff --git a/debug_toolbar/settings.py b/debug_toolbar/settings.py
index 59d538a0b..aea36e138 100644
--- a/debug_toolbar/settings.py
+++ b/debug_toolbar/settings.py
@@ -71,6 +71,7 @@ def get_config():
"debug_toolbar.panels.signals.SignalsPanel",
"debug_toolbar.panels.redirects.RedirectsPanel",
"debug_toolbar.panels.profiling.ProfilingPanel",
+ "debug_toolbar.panels.community.CommunityPanel",
]
diff --git a/debug_toolbar/templates/debug_toolbar/panels/community.html b/debug_toolbar/templates/debug_toolbar/panels/community.html
new file mode 100644
index 000000000..183cb6e42
--- /dev/null
+++ b/debug_toolbar/templates/debug_toolbar/panels/community.html
@@ -0,0 +1,47 @@
+{% load i18n %}
+
+
+
+ {% trans "Community & Contribution" %}
+
+
+
+ {% trans "Want to contribute to Django Debug Toolbar? Get involved in our community!" %}
+
+
+
+
+
+ {% trans "Django Debug Toolbar Documentation" %}
+
+
+ {% trans "Explore the official documentation to learn more about Django Debug Toolbar." %}
+
+
+
+ {% trans "Read Documentation" %}
+
+
diff --git a/docs/changes.rst b/docs/changes.rst
index 92cce4fe6..bf17b1ede 100644
--- a/docs/changes.rst
+++ b/docs/changes.rst
@@ -13,6 +13,7 @@ Pending
* Added support for using django-template-partials with the template panel's
source view functionality. The same change possibly adds support for other
template loaders.
+* Added Community panel
5.1.0 (2025-03-20)
------------------
From c4d7c9c0d5023bec719e7863500eb7390d0897e7 Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
<66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Wed, 2 Apr 2025 18:21:08 +0000
Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---
debug_toolbar/panels/community.py | 4 +++-
.../debug_toolbar/panels/community.html | 18 +++++++++---------
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/debug_toolbar/panels/community.py b/debug_toolbar/panels/community.py
index 562584ca9..ddb9be463 100644
--- a/debug_toolbar/panels/community.py
+++ b/debug_toolbar/panels/community.py
@@ -1,6 +1,8 @@
-from debug_toolbar.panels import Panel
from django.utils.translation import gettext_lazy as _
+from debug_toolbar.panels import Panel
+
+
class CommunityPanel(Panel):
"""
A panel that provides links to the Django Debug Toolbar community.
diff --git a/debug_toolbar/templates/debug_toolbar/panels/community.html b/debug_toolbar/templates/debug_toolbar/panels/community.html
index 183cb6e42..559030eea 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/community.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/community.html
@@ -4,43 +4,43 @@
{% trans "Community & Contribution" %}
-
+
{% trans "Want to contribute to Django Debug Toolbar? Get involved in our community!" %}
-
+
-
+
{% trans "Django Debug Toolbar Documentation" %}
{% trans "Explore the official documentation to learn more about Django Debug Toolbar." %}
-
-
{% trans "Read Documentation" %}
From 12efb526e9b02b51b400d2eb5844cefb5660ef09 Mon Sep 17 00:00:00 2001
From: andoriyaprashant
Date: Thu, 3 Apr 2025 01:02:22 +0530
Subject: [PATCH 3/3] CommunityPanel
---
tests/panels/test_history.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/panels/test_history.py b/tests/panels/test_history.py
index 4c5244934..6af9f5480 100644
--- a/tests/panels/test_history.py
+++ b/tests/panels/test_history.py
@@ -79,6 +79,7 @@ class HistoryViewsTestCase(IntegrationTestCase):
"CachePanel",
"SignalsPanel",
"ProfilingPanel",
+ "CommunityPanel",
}
def test_history_panel_integration_content(self):