From ed38503199f2e6caaaaeaaa8fc391eb668e799c0 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sat, 17 Feb 2018 07:41:56 -0600 Subject: added a /latest/ url for redirecting social media like instagram --- app/jrnl/views.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/jrnl/views.py') diff --git a/app/jrnl/views.py b/app/jrnl/views.py index 28d44a1..75501f4 100644 --- a/app/jrnl/views.py +++ b/app/jrnl/views.py @@ -110,6 +110,13 @@ class HomepageList(ListView): return context +class JrnlLatestView(EntryDetailView): + template_name = "details/entry_latest.html" + + def get_object(self): + obj = self.model.objects.latest() + return obj + class JrnlRSSFeedView(Feed): title = "Luxagraf: Topographical Writings" link = "/jrnl/" -- cgit v1.2.3-70-g09d2