Commit ab804dd5 authored by fred's avatar fred
Browse files

exclude obsolete newsitem off focus space

parent 15d4af14
......@@ -535,7 +535,10 @@ class News(TemplateView):
template_name = 'news.html'
def get_context_data(self, **kwargs):
context = super(News, self).get_context_data(**kwargs)
context['focus'] = NewsItem.objects.exclude('category').order_by('-date')[:10]
context['focus'] = NewsItem.objects.exclude( # publication date
).exclude( # expiration date
context['news'] = NewsItem.objects.exclude('-date')
return context
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment