diff --git a/templates/twitch/organization_detail.html b/templates/twitch/organization_detail.html index cc7723f..70693df 100644 --- a/templates/twitch/organization_detail.html +++ b/templates/twitch/organization_detail.html @@ -34,4 +34,5 @@ {% endfor %} +
{{ org_data }}
{% endblock content %}
diff --git a/twitch/views.py b/twitch/views.py
index eb91885..9293a5d 100644
--- a/twitch/views.py
+++ b/twitch/views.py
@@ -63,9 +63,18 @@ class OrgDetailView(DetailView):
games: QuerySet[Game, Game] = organization.games.all() # pyright: ignore[reportAttributeAccessIssue]
+ serialized_org = serialize(
+ "json",
+ [organization],
+ fields=("name",),
+ )
+ org_data = json.loads(serialized_org)
+ pretty_org_data = json.dumps(org_data[0], indent=4)
+
context.update({
"subscription": subscription,
"games": games,
+ "org_data": pretty_org_data,
})
return context