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