From 5d63bb9963ae6e41fc6c2cca97834b40beb71a0b Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 3 Mar 2021 13:43:54 +0100 Subject: remove views not used by new homepage diff --git a/program/templates/v2/current_show.html b/program/templates/v2/current_show.html deleted file mode 100644 index ab5f843..0000000 --- a/program/templates/v2/current_show.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - Current program box - - - - - diff --git a/program/templates/v2/recommendation.html b/program/templates/v2/recommendation.html deleted file mode 100644 index 3dfeed2..0000000 --- a/program/templates/v2/recommendation.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - Recomendations box - - - - - diff --git a/program/urls.py b/program/urls.py index 378faf1..0abce53 100644 --- a/program/urls.py +++ b/program/urls.py @@ -25,11 +25,9 @@ urlpatterns = patterns('', # V2 Patterns for new Homepage 2021 url(r'^v2/today/?$', views.DayScheduleViewV2.as_view()), url(r'^v2/(?P\d{4})/(?P\d{1,2})/(?P\d{1,2})/?$', views.DayScheduleViewV2.as_view()), - url(r'^v2/current_box/?$', cache_page(60)(views.CurrentShowBoxViewV2.as_view())), url(r'^v2/hosts/?$', views.HostListViewV2.as_view()), url(r'^v2/hosts/(?P\d+)/?$', views.HostDetailViewV2.as_view(), name='host-detail-v2'), url(r'^v2/tips/?$', views.RecommendationsListViewV2.as_view()), - url(r'^v2/tips_box/?$', views.RecommendationsBoxViewV2.as_view()), url(r'^v2/shows/?$', views.ShowListViewV2.as_view()), url(r'^v2/shows/(?P[\w-]+)/?$', views.ShowDetailViewV2.as_view(), name='show-detail-v2'), url(r'^v2/(?P\d+)/?$', views.TimeSlotDetailViewV2.as_view(), name='timeslot-detail-v2'), diff --git a/program/views.py b/program/views.py index 2a7609c..61a6207 100644 --- a/program/views.py +++ b/program/views.py @@ -259,28 +259,6 @@ class RecommendationsListViewV2(ListView): start__range=(now, end))).order_by('start')[:20] -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): template_name = 'v2/day_schedule.html' -- cgit v0.10.2