Commit a0886a69 authored by Simon Daron's avatar Simon Daron
Browse files

Five News with image on home

parent e3e50e42
......@@ -159,7 +159,7 @@ class Home(TemplateView):
def get_context_data(self, **kwargs):
context = super(Home, self).get_context_data(**kwargs)
context['news'] = NewsItem.objects.all().order_by('datetime')
context['news'] = NewsItem.objects.all().exclude(image__isnull=True).exclude(image__exact='').order_by('-datetime')[:5]
context['emissions'] = Emission.objects.filter(archived=False).order_by('?')
return context
Supports Markdown
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