blob: 56c0afbffb51772e05cf6234efdfa7bc0cdd775d (
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
26
27
28
29
30
|
# http://docs.djangoproject.com/en/dev/howto/custom-template-tags/
from django import template
register = template.Library()
from helsinki.program.models import (
BroadcastFormat,
MusicFocus,
ShowInformation,
ShowTopic)
@register.inclusion_tag('program/box_broadcastformat.html')
def broadcastformat():
broadcastformats = BroadcastFormat.objects.all()
return {'broadcastformats': broadcastformats}
@register.inclusion_tag('program/box_musicfocus.html')
def musicfocus():
musicfoci = MusicFocus.objects.all()
return {'musicfoci': musicfoci}
@register.inclusion_tag('program/box_showinformation.html')
def showinformation():
showinformations = ShowInformation.objects.all()
return {'showinformations': showinformations}
@register.inclusion_tag('program/box_showtopic.html')
def showtopic():
showtopics = ShowTopic.objects.all()
return {'showtopics': showtopics}
|