summaryrefslogtreecommitdiff
path: root/program/templatetags/content_boxes.py
blob: 2d1745ed7526518e1efc9f81947a6cff80eed7bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from django import template

from program.models import BroadcastFormat, MusicFocus, ShowInformation, ShowTopic

register = template.Library()


@register.inclusion_tag('boxes/broadcastformat.html')
def broadcastformat():
    return {'broadcastformat_list': BroadcastFormat.objects.filter(enabled=True)}


@register.inclusion_tag('boxes/musicfocus.html')
def musicfocus():
    return {'musicfocus_list': MusicFocus.objects.all()}


@register.inclusion_tag('boxes/showinformation.html')
def showinformation():
    return {'showinformation_list': ShowInformation.objects.all()}


@register.inclusion_tag('boxes/showtopic.html')
def showtopic():
    return {'showtopic_list': ShowTopic.objects.all()}