summaryrefslogtreecommitdiff
path: root/helsinki/program/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'helsinki/program/views.py')
-rw-r--r--helsinki/program/views.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/helsinki/program/views.py b/helsinki/program/views.py
index 48b5d5f..a9c7b67 100644
--- a/helsinki/program/views.py
+++ b/helsinki/program/views.py
@@ -2,18 +2,19 @@ from django.views.generic import list_detail
from django.views.generic import simple
from django.shortcuts import get_object_or_404
-from helsinki.program.models import BroadcastFormat, MusicFocus, Note, Show, ShowInformation, ShowTopic, TimeSlot
+from helsinki.program.models import (
+ BroadcastFormat,
+ MusicFocus,
+ Note,
+ Show,
+ ShowInformation,
+ ShowTopic,
+ TimeSlot)
from datetime import date, datetime, time, timedelta
def show_list(request):
- broadcastformats = BroadcastFormat.objects.all()
- musicfoci = MusicFocus.objects.all()
- showinformation = ShowInformation.objects.all()
- showtopics = ShowTopic.objects.all()
- extra_context = dict(broadcastformats=broadcastformats, musicfoci=musicfoci, showinformation=showinformation, showtopics=showtopics)
-
if 'broadcastformat' in request.GET:
broadcastformat = get_object_or_404(BroadcastFormat, slug=request.GET['broadcastformat'])
@@ -33,7 +34,7 @@ def show_list(request):
else:
queryset = Show.objects.all()
- return list_detail.object_list(request, queryset=queryset, extra_context=extra_context, template_object_name='show')
+ return list_detail.object_list(request, queryset=queryset, template_object_name='show')
def recommendations(request, template_name='program/recommendations.html'):
now = datetime.now()
@@ -51,10 +52,9 @@ def day_schedule(request, year=None, month=None, day=None):
tomorrow = today+timedelta(days=1)
- broadcastformats = BroadcastFormat.objects.all()
recommendations = Note.objects.filter(status=1, timeslot__start__range=(today, tomorrow))
- extra_context = dict(day=today, broadcastformats=broadcastformats, recommendations=recommendations)
+ extra_context = dict(day=today, recommendations=recommendations)
if 'broadcastformat' in request.GET:
broadcastformat = get_object_or_404(BroadcastFormat, slug=request.GET['broadcastformat'])