diff --git a/templates/twitch/campaign_detail.html b/templates/twitch/campaign_detail.html
index 206b65b..efb5eb1 100644
--- a/templates/twitch/campaign_detail.html
+++ b/templates/twitch/campaign_detail.html
@@ -77,6 +77,26 @@
target="_blank">Connect Account
{% endif %}
+
+ {% if allowed_channels %}
+ Allowed Channels
+
+ {% else %}
+ Allowed Channels
+ All channels allowed or no channel restrictions specified.
+ {% endif %}
Campaign Info
{% if drops %}
diff --git a/twitch/views.py b/twitch/views.py
index f527937..bec7dfc 100644
--- a/twitch/views.py
+++ b/twitch/views.py
@@ -232,7 +232,7 @@ class DropCampaignDetailView(DetailView):
if queryset is None:
queryset = self.get_queryset()
- queryset = queryset.select_related("game__owner")
+ queryset = queryset.select_related("game__owner").prefetch_related("allow_channels")
return super().get_object(queryset=queryset)
@@ -337,6 +337,7 @@ class DropCampaignDetailView(DetailView):
context["drops"] = enhanced_drops
context["campaign_data"] = format_and_color_json(campaign_data[0])
context["owner"] = campaign.game.owner
+ context["allowed_channels"] = campaign.allow_channels.all().order_by("display_name")
return context