Commit 0b0545d5 authored by fred's avatar fred
Browse files

news: update news homepage to consider all elements that got focus

parent 1237384c
......@@ -443,8 +443,7 @@ class News(TemplateView):
def get_context_data(self, **kwargs):
context = super(News, self).get_context_data(**kwargs)
context['sectionName'] = "News"
newsitem_ids = [x.newsitem_id for x in Focus.objects.filter(newsitem__isnull=False)]
context['focus'] = NewsItem.objects.filter(id__in=newsitem_ids).select_related('category').order_by('-date')[0:9]
context['focus'] = NewsItem.objects.filter(got_focus__isnull=False).select_related('category').order_by('-date')[0:9]
context['news'] = NewsItem.objects.all().order_by('-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