class HomeView(TemplateView):
template_name = 'phyll/home.html'
+ def get_context_data(self, **kwargs):
+ context = super(HomeView, self).get_context_data(**kwargs)
+ context['latest'] = Note.objects.filter(published=True).latest('creation_timestamp')
+ return context
+
class ArchivesView(ListView):
model = Note
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]