bornhack-website/news/views.py

10 lines
245 B
Python
Raw Normal View History

2016-05-30 19:36:14 +00:00
from django.views.generic import ListView
from . import models
class NewsIndex(ListView):
model = models.NewsItem
queryset = models.NewsItem.objects.public()
template_name = 'news_index.html'
context_object_name = 'news_items'