diff --git a/debug_toolbar/panels/community.py b/debug_toolbar/panels/community.py new file mode 100644 index 000000000..ddb9be463 --- /dev/null +++ b/debug_toolbar/panels/community.py @@ -0,0 +1,15 @@ +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. + """ + + 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..559030eea --- /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) ------------------ 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):