summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2011-05-11 20:42:51 (GMT)
committerErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2011-05-11 20:42:51 (GMT)
commit57017520ea977c97aa5af3c83fc040c613f7cedd (patch)
tree5d8e581d665efcf9d92aa978c2dd3c3ead5a7173 /program
parent0453f86bc62355f630048930b5fcb3c3a7f2db0e (diff)
fixed filtering in day view.
Diffstat (limited to 'program')
-rw-r--r--program/views.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/program/views.py b/program/views.py
index 52f7355..54630a1 100644
--- a/program/views.py
+++ b/program/views.py
@@ -55,6 +55,18 @@ def day_schedule(request, year=None, month=None, day=None):
broadcastformat = get_object_or_404(BroadcastFormat, slug=request.GET['broadcastformat'])
extra_context['timeslots'] = timeslots.filter(show__broadcastformat=broadcastformat)
+ elif 'musicfocus' in request.GET:
+ musicfocus = get_object_or_404(MusicFocus, slug=request.GET['musicfocus'])
+
+ extra_context['timeslots'] = timeslots.filter(show__musicfocus=musicfocus)
+ elif 'showinformation' in request.GET:
+ showinformation = get_object_or_404(ShowInformation, slug=request.GET['showinformation'])
+
+ extra_context['timeslots'] = timeslots.filter(show__showinformation=showinformation)
+ elif 'showtopic' in request.GET:
+ showtopic = get_object_or_404(ShowTopic, slug=request.GET['showtopic'])
+
+ extra_context['showtopic'] = timeslots.filter(show__showtopic=showtopic)
else:
extra_context['timeslots'] = timeslots