summaryrefslogtreecommitdiff
path: root/program/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'program/views.py')
-rw-r--r--program/views.py40
1 files changed, 20 insertions, 20 deletions
diff --git a/program/views.py b/program/views.py
index ab7bd82..2a7609c 100644
--- a/program/views.py
+++ b/program/views.py
@@ -259,8 +259,26 @@ class RecommendationsListViewV2(ListView):
start__range=(now, end))).order_by('start')[:20]
-class RecommendationsBoxViewV2(RecommendationsListView):
- template_name = 'v2/boxes/recommendation.html'
+class RecommendationsBoxViewV2(RecommendationsListViewV2):
+ template_name = 'v2/recommendation.html'
+
+
+class CurrentShowBoxViewV2(TemplateView):
+ context_object_name = 'recommendation_list'
+ template_name = 'v2/current_show.html'
+
+ def get_context_data(self, **kwargs):
+ current_timeslot = TimeSlot.objects.get_or_create_current()
+ previous_timeslot = current_timeslot.get_previous_by_start()
+ next_timeslot = current_timeslot.get_next_by_start()
+ after_next_timeslot = next_timeslot.get_next_by_start()
+
+ context = super(CurrentShowBoxViewV2, self).get_context_data(**kwargs)
+ context['current_timeslot'] = current_timeslot
+ context['previous_timeslot'] = previous_timeslot
+ context['next_timeslot'] = next_timeslot
+ context['after_next_timeslot'] = after_next_timeslot
+ return context
class DayScheduleViewV2(TemplateView):
@@ -305,24 +323,6 @@ class DayScheduleViewV2(TemplateView):
return context
-class CurrentShowBoxViewV2(TemplateView):
- context_object_name = 'recommendation_list'
- template_name = 'v2/boxes/current.html'
-
- def get_context_data(self, **kwargs):
- current_timeslot = TimeSlot.objects.get_or_create_current()
- previous_timeslot = current_timeslot.get_previous_by_start()
- next_timeslot = current_timeslot.get_next_by_start()
- after_next_timeslot = next_timeslot.get_next_by_start()
-
- context = super(CurrentShowBoxViewV2, self).get_context_data(**kwargs)
- context['current_timeslot'] = current_timeslot
- context['previous_timeslot'] = previous_timeslot
- context['next_timeslot'] = next_timeslot
- context['after_next_timeslot'] = after_next_timeslot
- return context
-
-
# Exports
def json_day_schedule(request, year=None, month=None, day=None):