diff options
author | luxagraf <sng@luxagraf.net> | 2018-09-02 10:39:20 -0600 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2018-09-02 10:39:20 -0600 |
commit | 814441c8a3cc22094634d267f6cba5de95bdfa93 (patch) | |
tree | 93a0b2c752538dbe5645205b4cf4314129d69fed | |
parent | 9d5155cf8892e76c610b6e78ec52be0345835a07 (diff) |
switched to use new Home model in views
-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 |