diff options
author | luxagraf <sng@luxagraf.net> | 2019-02-18 15:21:42 -0600 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2019-02-18 15:21:42 -0600 |
commit | e7af8a1e0f71d38b7e83a22a822fb9d971a41ec2 (patch) | |
tree | e424d7d4e9031c9d3d09e629ce331bf882bb392c /app/jrnl/views.py | |
parent | 5da1a1e66a38c0d7185a90424d0bb9f3c3c7875d (diff) |
redid sightings design and moved all location defered things to location
objects
Diffstat (limited to 'app/jrnl/views.py')
-rw-r--r-- | app/jrnl/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
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] |