diff options
Diffstat (limited to 'app/jrnl/views.py')
-rw-r--r-- | app/jrnl/views.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/jrnl/views.py b/app/jrnl/views.py index 94d887c..ed8efcf 100644 --- a/app/jrnl/views.py +++ b/app/jrnl/views.py @@ -8,7 +8,7 @@ from django.db.models import Q from utils.views import PaginatedListView -from .models import Entry, HomepageCurrator +from .models import Entry, HomepageCurrator, Home from locations.models import CheckIn, Country, Region, Location from sightings.models import Sighting @@ -99,7 +99,7 @@ class HomepageList(ListView): Return a main entry and list of Entries in reverse chronological order """ context_object_name = 'recent' - exclude = HomepageCurrator.objects.get(pk=1) + exclude = Home.objects.get(pk=1) queryset = Entry.objects.filter(status__exact=1).exclude(pk=exclude.featured.pk)[:8] def get_template_names(self): @@ -109,7 +109,7 @@ class HomepageList(ListView): def get_context_data(self, **kwargs): # Call the base implementation first to get a context context = super(HomepageList, self).get_context_data(**kwargs) - context['homepage'] = HomepageCurrator.objects.get(pk=1) + context['homepage'] = Home.objects.get(pk=1) context['location'] = CheckIn.objects.latest() context['IMAGES_URL'] = settings.IMAGES_URL return context |