Skip to content
Merged
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
5 changes: 5 additions & 0 deletions portal/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,9 @@
views.stats_json,
name="portal_stats_json",
),
path(
"dashboard_gallery",
views.dashboard_gallery,
name="dashboard_gallery",
),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
9 changes: 9 additions & 0 deletions portal/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,12 @@ def stats_json(request):
context["stats"] = get_stats_cached_values()

return JsonResponse(context)


def dashboard_gallery(request):
"""
Show a gallery of dashboards.
"""
context = {}

return render(request, "portal/dashboard_gallery.html", context)
41 changes: 41 additions & 0 deletions templates/portal/dashboard_gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{% extends "portal/base.html" %}
{% load allauth i18n %}
{% load django_bootstrap5 %}
{% block body %}
{% endblock body %}
{% block content %}
<div class="container px-4 py-3" id="featured-3">
<h1 class="pb-2 border-bottom">
Gallery of Dashboard Visualization using PyLadiesCon Stats and Data
</h1>
<div class="alert alert-success" role="alert">
<p class="mb-0">
Did you build your own dashboard using our <a href="{% url 'portal_stats_json' %}">conference data</a>? Share it with us by opening a pull request to add it to this page.
</p>
</div>
<h2 id="sponsor-dashboard-posit">
<span><a href="#sponsor-dashboard-posit"><i class="fa-solid fa-link"></i></a> </span>
Sponsorship Dashboard on Posit Cloud built by Daniel Chen
<span> <a href="https://019aa58c-61dc-6a8e-d7ae-6ab2736a5655.share.connect.posit.cloud/"
target="_blank"><i class="fas fa-external-link"></i></a></span>
</h2>
<div>
<iframe src="https://019aa58c-61dc-6a8e-d7ae-6ab2736a5655.share.connect.posit.cloud/"
width="1200px"
height="1000px">
</iframe>
</div>
<h2 id="volunteer-dashboard-posit">
<span><a href="#sponsor-dashboard-posit"><i class="fa-solid fa-link"></i></a> </span>
Volunteers Dashboard on Posit Cloud built by Daniel Chen
<span> <a href="https://019aa58d-0797-4823-0bc7-f5126c80d31e.share.connect.posit.cloud/"
target="_blank"><i class="fas fa-external-link"></i></a></span>
</h2>
<div>
<iframe src="https://019aa58d-0797-4823-0bc7-f5126c80d31e.share.connect.posit.cloud/"
width="1200px"
height="1000px"></iframe>
{% include "portal/sponsor_donate_callout.html" %}
</div>
</div>
{% endblock content %}
29 changes: 29 additions & 0 deletions templates/portal/sponsor_donate_callout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!-- Sponsor/Donate Callout -->
<div class="container border rounded-3 p-4 mb-4 bg-light">
<div class="row align-items-center">
<div class="col-md-8">
<h3 class="mb-2">
Support PyLadiesCon!
</h3>
<p class="mb-0 text-muted">
Help us make PyLadiesCon possible by becoming a sponsor or making a donation.
Your support enables us to create an inclusive and accessible conference for the global PyLadies
community.
</p>
</div>
<div class="col-md-4 text-md-end mt-3 mt-md-0">
<a href="https://2025.conference.pyladies.com/en/sponsors/"
target="_blank"
rel="noopener noreferrer"
class="btn btn-primary btn-lg me-2 mb-2">
<i class="bi bi-building"></i> Sponsor Us
</a>
<a href="https://2025.conference.pyladies.com/en/donate/"
target="_blank"
rel="noopener noreferrer"
class="btn btn-success btn-lg mb-2">
<i class="bi bi-heart-fill"></i> Donate
</a>
</div>
</div>
</div>
15 changes: 15 additions & 0 deletions templates/portal/stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@
<h2 class="pb-2 border-bottom">
PyLadiesCon Stats and Numbers
</h2>
<div class="alert alert-success" role="alert">
<h4 class="alert-heading">
Live conference stats*
</h4>
<p class="mb-0">
Our stats are also available as a <a href="{% url 'portal_stats_json' %}">JSON endpoint</a> so that you can come up with your own visualization and dashboard.
</p>
<p class="mb-0">
View the <a href="{% url 'dashboard_gallery' %}">Dashboard Gallery</a> to see what others have built using our data!
</p>
<hr>
<p>
<span class="text-muted">*Up to 5 minutes delay.</span>
</p>
</div>
{% include "sponsorship/sponsorship_stats.html" %}
<!-- Sponsor/Donate Callout -->
<div class="container border rounded-3 p-4 mb-4 bg-light">
Expand Down
8 changes: 8 additions & 0 deletions tests/portal/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,11 @@ def test_stats_json_endpoint(self, client):
assert response.status_code == 200
data = response.json()
assert "stats" in data


class TestDashboardGallery:

def test_dashboard_gallery_is_public(self, client):
response = client.get(reverse("dashboard_gallery"))
assert response.status_code == 200
assert "Gallery of Dashboard Visualization" in response.content.decode()