summaryrefslogtreecommitdiff
path: root/app/jrnl/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/jrnl/views.py')
-rw-r--r--app/jrnl/views.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/jrnl/views.py b/app/jrnl/views.py
index c68625d..6d0e85b 100644
--- a/app/jrnl/views.py
+++ b/app/jrnl/views.py
@@ -7,6 +7,7 @@ from django.conf import settings
from utils.views import PaginatedListView
from .models import Entry, HomepageCurrator
+from daily.models import CheckIn
from locations.models import Country, Region
@@ -84,7 +85,8 @@ class HomepageList(ListView):
Return a main entry and list of Entries in reverse chronological order
"""
context_object_name = 'recent'
- queryset = Entry.objects.filter(status__exact=1)[:5]
+ exclude = HomepageCurrator.objects.get(pk=1)
+ queryset = Entry.objects.filter(status__exact=1).exclude(pk=exclude.featured.pk)[:8]
def get_template_names(self):
obj = HomepageCurrator.objects.get(pk=1)
@@ -94,6 +96,7 @@ class HomepageList(ListView):
# 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['location'] = CheckIn.objects.get(pk=1)
context['IMAGES_URL'] = settings.IMAGES_URL
return context