summaryrefslogtreecommitdiff
path: root/program/templatetags
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2021-02-26 18:30:07 (GMT)
committerChristian Pointner <equinox@helsinki.at>2021-02-26 18:30:07 (GMT)
commiteee8713edf499865dee264d0c3a8947c752b02a4 (patch)
treea3bf8df502fbc4326e91ed7884ce8958175d7a7c /program/templatetags
parentaf048dbfb9143be9958934a6f0b65d304bc13b22 (diff)
parent850f92794a2571f44fd95f53a3f96f5ea659b3a4 (diff)
Merge branch 'new-homepage' into stable
Diffstat (limited to 'program/templatetags')
-rw-r--r--program/templatetags/filters.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/program/templatetags/filters.py b/program/templatetags/filters.py
new file mode 100644
index 0000000..811216b
--- /dev/null
+++ b/program/templatetags/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()}