]> git.0d.be Git - panikweb.git/commitdiff
limit number of news displayed directly in news page
authorFrédéric Péters <fpeters@0d.be>
Sun, 8 Sep 2013 17:02:22 +0000 (19:02 +0200)
committerFrédéric Péters <fpeters@0d.be>
Sun, 8 Sep 2013 17:02:22 +0000 (19:02 +0200)
panikweb/views.py

index a95c527f097a30433823ca7fa11d12796ac06d6d..2a81471a4c711c5ef0b4c1fac812c1469013ddac 100644 (file)
@@ -426,7 +426,7 @@ class News(TemplateView):
         context = super(News, self).get_context_data(**kwargs)
         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['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()
         return context