Commit fbd65159 authored by fred's avatar fred

limit number of news displayed directly in news page

parent 33bba456
...@@ -426,7 +426,7 @@ class News(TemplateView): ...@@ -426,7 +426,7 @@ class News(TemplateView):
context = super(News, self).get_context_data(**kwargs) context = super(News, self).get_context_data(**kwargs)
context['sectionName'] = "News" context['sectionName'] = "News"
context['focus'] = list(NewsItem.objects.all().filter(focus=True).exclude(image__isnull=True).exclude(image__exact='').order_by('-date')[0:9]) context['focus'] = list(NewsItem.objects.all().filter(focus=True).exclude(image__isnull=True).exclude(image__exact='').order_by('-date')[0:9])
context['news'] = list(NewsItem.objects.all().exclude(focus=True).exclude(image__isnull=True).exclude(image__exact='').order_by('-date')[3:45]) context['news'] = list(NewsItem.objects.all().exclude(focus=True).exclude(image__isnull=True).exclude(image__exact='').order_by('-date')[3:14])
context['categories'] = NewsCategory.objects.all() context['categories'] = NewsCategory.objects.all()
return context 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