summaryrefslogtreecommitdiff
path: root/program/templatetags/content_boxes.py
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2021-02-24 14:42:40 (GMT)
committerChristian Pointner <equinox@helsinki.at>2021-02-24 22:57:42 (GMT)
commit3f935fe643fd8d4f807803c99dbd25d048acb143 (patch)
treea468d91855967488107bfa909306f3f8f292f0ce /program/templatetags/content_boxes.py
parenta1064414914efd53ef1c44ee12392fef8a0c0b0f (diff)
add V2 views and template tags for new homepage
Diffstat (limited to 'program/templatetags/content_boxes.py')
-rw-r--r--program/templatetags/content_boxes.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/program/templatetags/content_boxes.py b/program/templatetags/content_boxes.py
index ece466b..f979ca2 100644
--- a/program/templatetags/content_boxes.py
+++ b/program/templatetags/content_boxes.py
@@ -5,6 +5,8 @@ from program.models import BroadcastFormat, MusicFocus, ShowInformation, ShowTop
register = template.Library()
+# Legacy Tags for Homepage until 2021
+
@register.inclusion_tag('boxes/broadcastformat.html')
def broadcastformat():
return {'broadcastformat_list': BroadcastFormat.objects.filter(enabled=True)}
@@ -28,3 +30,30 @@ def showtopic():
@register.inclusion_tag('boxes/language.html')
def language():
return {'language_list': Language.objects.all()}
+
+
+# V2 Tags added for new Homepage 2021
+
+@register.inclusion_tag('v2/boxes/broadcastformat.html')
+def broadcastformatV2():
+ return {'broadcastformat_list': BroadcastFormat.objects.filter(enabled=True)}
+
+
+@register.inclusion_tag('v2/boxes/musicfocus.html')
+def musicfocusV2():
+ return {'musicfocus_list': MusicFocus.objects.all()}
+
+
+@register.inclusion_tag('v2/boxes/showinformation.html')
+def showinformationV2():
+ return {'showinformation_list': ShowInformation.objects.all()}
+
+
+@register.inclusion_tag('v2/boxes/showtopic.html')
+def showtopicV2():
+ return {'showtopic_list': ShowTopic.objects.all()}
+
+
+@register.inclusion_tag('v2/boxes/language.html')
+def languageV2():
+ return {'language_list': Language.objects.all()}