X-Git-Url: https://git.0d.be/?p=chloro.git;a=blobdiff_plain;f=chloro%2Fphyll%2Fviews.py;h=84b40e7fd0071ba633ceb553ffd05dfc20cafc3f;hp=78d2fec19de64e18ec5804ac5b91fe5cce7e3044;hb=f11d4b4f365634feebcb04bc414cc1615c60ceef;hpb=ae8e97fcc17a203a6b03a97e086e03210ae478d3 diff --git a/chloro/phyll/views.py b/chloro/phyll/views.py index 78d2fec..84b40e7 100644 --- a/chloro/phyll/views.py +++ b/chloro/phyll/views.py @@ -65,6 +65,11 @@ class NoteDeleteView(DeleteView): class HomeView(TemplateView): template_name = 'phyll/home.html' + def get_context_data(self, **kwargs): + context = super(HomeView, self).get_context_data(**kwargs) + context['posts'] = Note.objects.filter(published=True).order_by('-creation_timestamp')[:5] + return context + class ArchivesView(ListView): model = Note @@ -118,7 +123,6 @@ class AtomFeed(Feed): return item.text def item_guid(self, item): - legacy_id = None for tag in item.tags.all(): if tag.name.startswith('old-post-id-'): return 'http://www.0d.be/posts/%s' % tag.name.split('-')[-1]