summaryrefslogtreecommitdiff
path: root/program/templatetags
diff options
context:
space:
mode:
authorErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2011-04-13 18:53:29 (GMT)
committerErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2011-04-13 18:53:29 (GMT)
commit103a909a999ecb8e2bce2cf84e4ec39968223a53 (patch)
treee219a86a6b468b736a47f21061916b114be54427 /program/templatetags
parentba41badf0171cd618034e4c9eb21893eaf1ccd90 (diff)
getting real.
Diffstat (limited to 'program/templatetags')
-rw-r--r--program/templatetags/__init__.py0
-rw-r--r--program/templatetags/content_boxes.py26
2 files changed, 26 insertions, 0 deletions
diff --git a/program/templatetags/__init__.py b/program/templatetags/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/program/templatetags/__init__.py
diff --git a/program/templatetags/content_boxes.py b/program/templatetags/content_boxes.py
new file mode 100644
index 0000000..7108c5a
--- /dev/null
+++ b/program/templatetags/content_boxes.py
@@ -0,0 +1,26 @@
+# http://docs.djangoproject.com/en/1.2/howto/custom-template-tags/
+
+from django import template
+register = template.Library()
+
+from program.models import BroadcastFormat, MusicFocus, ShowInformation, ShowTopic
+
+@register.inclusion_tag('program/boxes/broadcastformat.html')
+def broadcastformat():
+ broadcastformats = BroadcastFormat.objects.all()
+ return {'broadcastformats': broadcastformats}
+
+@register.inclusion_tag('program/boxes/musicfocus.html')
+def musicfocus():
+ musicfoci = MusicFocus.objects.all()
+ return {'musicfoci': musicfoci}
+
+@register.inclusion_tag('program/boxes/showinformation.html')
+def showinformation():
+ showinformations = ShowInformation.objects.all()
+ return {'showinformations': showinformations}
+
+@register.inclusion_tag('program/boxes/showtopic.html')
+def showtopic():
+ showtopics = ShowTopic.objects.all()
+ return {'showtopics': showtopics}