summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-05-27 19:47:19 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-05-27 19:47:19 (GMT)
commite8572ea3d9869760fe70bd467e0a8692f217cb02 (patch)
tree7c658e6cb71966fdbd62e9e96ddc7297d116b550 /program
parent1ac4db5369b990d020d2ec59209952a641dedaf5 (diff)
parent5f1b7dec9166ef1bfeb09bca2a3f8899f27f27a5 (diff)
merged speed optimization branch
Diffstat (limited to 'program')
-rw-r--r--program/views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/program/views.py b/program/views.py
index 5dc82dd..23aab75 100644
--- a/program/views.py
+++ b/program/views.py
@@ -27,7 +27,7 @@ class HostDetailView(DetailView):
class ShowListView(ListView):
context_object_name = 'show_list'
- queryset = Show.objects.filter(is_active=True).exclude(id=1).distinct()
+ queryset = Show.objects.filter(is_active=True).exclude(id=1)
template_name = 'show_list.html'
def get_queryset(self):
@@ -50,7 +50,7 @@ class ShowListView(ListView):
class ShowDetailView(DetailView):
- queryset = Show.objects.all().exclude(id=1)
+ queryset = Show.objects.exclude(id=1)
template_name = 'show_detail.html'
@@ -195,7 +195,7 @@ def json_day_schedule(request, year=None, month=None, day=None):
else:
today = datetime.strptime('%s__%s__%s__00__00' % (year, month, day), '%Y__%m__%d__%H__%M')
- timeslots = TimeSlot.objects.get_24h_timeslots(today)
+ timeslots = TimeSlot.objects.get_24h_timeslots(today).select_related('programslot')
schedule = []
for ts in timeslots:
entry = {