Doh, we got news items on startup :P Explains a lot!

This commit is contained in:
Víðir Valberg Guðmundsson 2016-06-16 18:46:52 +02:00
parent 70d9a8797f
commit da4843bb06

View file

@ -5,10 +5,12 @@ from . import models
class NewsIndex(ListView): class NewsIndex(ListView):
model = models.NewsItem model = models.NewsItem
queryset = models.NewsItem.objects.public()
template_name = 'news_index.html' template_name = 'news_index.html'
context_object_name = 'news_items' context_object_name = 'news_items'
def get_queryset(self):
return self.model.objects.public()
class NewsDetail(DetailView): class NewsDetail(DetailView):
model = models.NewsItem model = models.NewsItem