def get_context_data(self, **kwargs):
context = super(HomeView, self).get_context_data(**kwargs)
- context['latest'] = Note.objects.filter(published=True).latest('creation_timestamp')
+ context['posts'] = Note.objects.filter(published=True).order_by('-creation_timestamp')[:5]
return context