summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/jrnl/build.py5
-rw-r--r--app/jrnl/urls.py5
-rw-r--r--app/jrnl/views.py7
3 files changed, 17 insertions, 0 deletions
diff --git a/app/jrnl/build.py b/app/jrnl/build.py
index ba2aae4..1f86b39 100644
--- a/app/jrnl/build.py
+++ b/app/jrnl/build.py
@@ -17,6 +17,7 @@ class BuildJrnl(BuildNew):
self.build_detail_view()
self.build_location_view()
self.build_feed("jrnl:feed")
+ self.build_latest()
def build_arc(self):
self.build_list_view(
@@ -56,6 +57,10 @@ class BuildJrnl(BuildNew):
def build_homepage(self):
response = self.client.get('/')
self.write_file('', response.content)
+
+ def build_latest(self):
+ response = self.client.get('/jrnl/latest/')
+ self.write_file(reverse("jrnl:latest"), response.content)
def build_map(self):
self.build_list_view(
diff --git a/app/jrnl/urls.py b/app/jrnl/urls.py
index 82a4b22..caf1935 100644
--- a/app/jrnl/urls.py
+++ b/app/jrnl/urls.py
@@ -36,6 +36,11 @@ urlpatterns = [
views.EntryList.as_view(),
name="list"
),
+ path(
+ r'latest/',
+ views.JrnlLatestView.as_view(),
+ name="latest"
+ ),
re_path(
r'(?P<slug>[-\w]+)/(?P<page>\d+)/$',
views.EntryCountryList.as_view(),
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/"