summaryrefslogtreecommitdiff
path: root/program/templatetags/show_filters.py
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2021-03-03 13:43:22 (GMT)
committerChristian Pointner <equinox@helsinki.at>2021-03-03 13:43:22 (GMT)
commit59be96ee97d08017bd3ba37b77fc5a3442262909 (patch)
treeb566c607f3f971edc8734b62c124e9c1625705c3 /program/templatetags/show_filters.py
parent546a1a082e6cbafaf0fd5a7063c3694e0e0205f3 (diff)
move show filters to seperate endpoint
Diffstat (limited to 'program/templatetags/show_filters.py')
-rw-r--r--program/templatetags/show_filters.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/program/templatetags/show_filters.py b/program/templatetags/show_filters.py
new file mode 100644
index 0000000..811216b
--- /dev/null
+++ b/program/templatetags/show_filters.py
@@ -0,0 +1,30 @@
+from django import template
+
+from program.models import BroadcastFormat, MusicFocus, ShowInformation, ShowTopic, Language
+
+register = template.Library()
+
+
+@register.inclusion_tag('v2/filters/broadcastformat.html')
+def broadcastformatV2():
+ return {'broadcastformat_list': BroadcastFormat.objects.filter(enabled=True)}
+
+
+@register.inclusion_tag('v2/filters/musicfocus.html')
+def musicfocusV2():
+ return {'musicfocus_list': MusicFocus.objects.all()}
+
+
+@register.inclusion_tag('v2/filters/showinformation.html')
+def showinformationV2():
+ return {'showinformation_list': ShowInformation.objects.all()}
+
+
+@register.inclusion_tag('v2/filters/showtopic.html')
+def showtopicV2():
+ return {'showtopic_list': ShowTopic.objects.all()}
+
+
+@register.inclusion_tag('v2/filters/language.html')
+def languageV2():
+ return {'language_list': Language.objects.all()}