summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2011-05-16 21:50:28 (GMT)
committerErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2011-05-16 21:50:28 (GMT)
commit359cfdf60d3a1797ad8a80a66b56090f1ff6bdd7 (patch)
tree25444ff9fe6fc17b0241747a2be5bb3376a9607c
parente47b1d9892fd9d143d5c3d56ecec69f6544a8663 (diff)
excluded default show from show list.
-rw-r--r--program/views.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/program/views.py b/program/views.py
index 54630a1..5d50349 100644
--- a/program/views.py
+++ b/program/views.py
@@ -6,25 +6,25 @@ from models import BroadcastFormat, MusicFocus, Note, Show, ShowInformation, Sho
from datetime import date, datetime, time, timedelta
def show_list(request):
+ queryset = Show.objects.exclude(id=1)
+
if 'broadcastformat' in request.GET:
broadcastformat = get_object_or_404(BroadcastFormat, slug=request.GET['broadcastformat'])
- queryset = Show.objects.filter(broadcastformat=broadcastformat)
+ queryset = queryset.filter(broadcastformat=broadcastformat)
elif 'musicfocus' in request.GET:
musicfocus = get_object_or_404(MusicFocus, slug=request.GET['musicfocus'])
- queryset = Show.objects.filter(musicfocus=musicfocus)
+ queryset = queryset.filter(musicfocus=musicfocus)
elif 'showinformation' in request.GET:
showinformation = get_object_or_404(ShowInformation, slug=request.GET['showinformation'])
- queryset = Show.objects.filter(showinformation=showinformation)
+ queryset = queryset.exfilter(showinformation=showinformation)
elif 'showtopic' in request.GET:
showtopic = get_object_or_404(ShowTopic, slug=request.GET['showtopic'])
- queryset = Show.objects.filter(showtopic=showtopic)
- else:
- queryset = Show.objects.all()
-
+ queryset = queryset.filter(showtopic=showtopic)
+
return list_detail.object_list(request, queryset=queryset, template_object_name='show')
def recommendations(request, template_name='program/recommendations.html'):