From c5a67ad37c4247245fd2a61318dace58a0f26f60 Mon Sep 17 00:00:00 2001 From: Patrick Mayr Date: Mon, 30 Jan 2023 09:24:00 +0000 Subject: [PATCH] swap next and prev --- fet2020/posts/views.py | 10 +++++----- fet2020/templates/posts/show.html | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fet2020/posts/views.py b/fet2020/posts/views.py index caceddb3..4b217d6b 100644 --- a/fet2020/posts/views.py +++ b/fet2020/posts/views.py @@ -139,7 +139,7 @@ class PostDetailView(DetailView): "author": author, "author_image": author_image, "next": self.post_next(), - "previous": self.post_previous(), + "prev": self.post_prev(), "related_posts": related_posts[:4], } @@ -158,9 +158,9 @@ class PostDetailView(DetailView): return template_name - def post_next(self): + def post_prev(self): """ - Helper function for getting next post + Helper function for getting previous post """ posts = Post.objects.date_sorted_list(self.public_only).filter( post_type=self.object.post_type @@ -171,9 +171,9 @@ class PostDetailView(DetailView): return qs.first().slug - def post_previous(self): + def post_next(self): """ - Helper function for getting previous post + Helper function for getting next post """ posts = ( Post.objects.date_sorted_list(self.public_only) diff --git a/fet2020/templates/posts/show.html b/fet2020/templates/posts/show.html index 794dfa24..c360ae13 100644 --- a/fet2020/templates/posts/show.html +++ b/fet2020/templates/posts/show.html @@ -12,7 +12,7 @@ {% block content %}
-