From e7af8a1e0f71d38b7e83a22a822fb9d971a41ec2 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Mon, 18 Feb 2019 15:21:42 -0600 Subject: redid sightings design and moved all location defered things to location objects --- app/jrnl/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/jrnl/views.py') diff --git a/app/jrnl/views.py b/app/jrnl/views.py index d1c4159..95b5c64 100644 --- a/app/jrnl/views.py +++ b/app/jrnl/views.py @@ -23,7 +23,7 @@ class EntryList(PaginatedListView): def get_queryset(self): queryset = super(EntryList, self).get_queryset() print(queryset) - return queryset.filter(status__exact=1).order_by('-pub_date').select_related('location').prefetch_related('featured_image') + return queryset.filter(status__exact=1).order_by('-pub_date').prefetch_related('location').prefetch_related('featured_image') class EntryCountryList(PaginatedListView): @@ -115,7 +115,7 @@ class HomepageList(ListView): def get_queryset(self): queryset = super(HomepageList, self).get_queryset() self.home = self.get_home() - return queryset.filter(status__exact=1).order_by('-pub_date').exclude().select_related('location').select_related('featured_image')[1:9] + return queryset.filter(status__exact=1).order_by('-pub_date').exclude().select_related('location').select_related('featured_image')[2:10] def get_template_names(self): return ['%s' % self.home.template_name] -- cgit v1.2.3-70-g09d2