From da4843bb06f8fae4815b222ae0652b05f412c5dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Thu, 16 Jun 2016 18:46:52 +0200 Subject: [PATCH] Doh, we got news items on startup :P Explains a lot! --- news/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/news/views.py b/news/views.py index 6755f2fe..45891c12 100644 --- a/news/views.py +++ b/news/views.py @@ -5,10 +5,12 @@ from . import models class NewsIndex(ListView): model = models.NewsItem - queryset = models.NewsItem.objects.public() template_name = 'news_index.html' context_object_name = 'news_items' + def get_queryset(self): + return self.model.objects.public() + class NewsDetail(DetailView): model = models.NewsItem