Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added toolbar Community panel #2119

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions debug_toolbar/panels/community.py
Original file line number Diff line number Diff line change
@@ -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")
1 change: 1 addition & 0 deletions debug_toolbar/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]


Expand Down
47 changes: 47 additions & 0 deletions debug_toolbar/templates/debug_toolbar/panels/community.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{% load i18n %}

<div class="djdt-panelContent" style="font-family: Arial, sans-serif; padding: 20px;">
<h2 style="color: #2c3e50; border-bottom: 2px solid #3498db; padding-bottom: 10px; font-size: 22px;">
{% trans "Community & Contribution" %}
</h2>

<p style="font-size: 18px; color: #555;">
{% trans "Want to contribute to Django Debug Toolbar? Get involved in our community!" %}
</p>

<div style="margin-top: 15px;">
<ul style="list-style-type: disc; padding-left: 20px;">
<li>
<a href="https://github.com/django-commons/django-debug-toolbar/discussions" target="_blank"
style="text-decoration: none; color: #007bff; font-weight: bold; font-size: 16px;">
{% trans "Join Discussions" %}
</a>
</li>
<li>
<a href="https://github.com/django-commons/django-debug-toolbar/issues" target="_blank"
style="text-decoration: none; color: #007bff; font-weight: bold; font-size: 16px;">
{% trans "View Issues" %}
</a>
</li>
<li>
<a href="https://django-debug-toolbar.readthedocs.io/en/latest/contributing.html" target="_blank"
style="text-decoration: none; color: #007bff; font-weight: bold; font-size: 16px;">
{% trans "Contribution Guide" %}
</a>
</li>
</ul>
</div>

<h3 style="color: #2c3e50; margin-top: 20px; font-size: 20px;">
{% trans "Django Debug Toolbar Documentation" %}
</h3>
<p style="font-size: 16px; color: #666;">
{% trans "Explore the official documentation to learn more about Django Debug Toolbar." %}
</p>
<br>
<a href="https://django-debug-toolbar.readthedocs.io/en/latest/" target="_blank"
style="text-decoration: none; background-color: #2980b9; color: white; padding: 10px 18px;
border-radius: 5px; font-weight: bold; font-size: 16px; display: inline-block;">
{% trans "Read Documentation" %}
</a>
</div>
1 change: 1 addition & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
------------------
Expand Down
1 change: 1 addition & 0 deletions tests/panels/test_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class HistoryViewsTestCase(IntegrationTestCase):
"CachePanel",
"SignalsPanel",
"ProfilingPanel",
"CommunityPanel",
}

def test_history_panel_integration_content(self):
Expand Down