]> git.0d.be Git - chloro.git/commitdiff
add context variable for recent changes on home
authorFrédéric Péters <fpeters@0d.be>
Sat, 16 Jul 2022 21:25:38 +0000 (23:25 +0200)
committerFrédéric Péters <fpeters@0d.be>
Sat, 16 Jul 2022 21:25:38 +0000 (23:25 +0200)
chloro/phyll/views.py

index 6ad8015f2ff43b2de6a3fb9c2a74988c20e7d336..e67a1bc6b41a162a006a045e995fe111255f637d 100644 (file)
@@ -85,6 +85,7 @@ class HomeView(TemplateView):
     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]
+        context['recent_changes'] = Note.objects.filter(published=True).order_by('-last_update_timestamp')
         return context