From 7aced039761206f07643dc7178323ca4853c9dfd Mon Sep 17 00:00:00 2001 From: aroberts-fox Date: Wed, 27 Nov 2024 15:05:35 -0500 Subject: [PATCH] adjusting newest to new internally --- app/templates/user/_read_posts_nav.html | 2 +- app/user/routes.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/user/_read_posts_nav.html b/app/templates/user/_read_posts_nav.html index 7865544e..b80edf7e 100644 --- a/app/templates/user/_read_posts_nav.html +++ b/app/templates/user/_read_posts_nav.html @@ -1,5 +1,5 @@
- + {{ _('Newest') }} diff --git a/app/user/routes.py b/app/user/routes.py index 3bbb038d..e02830ea 100644 --- a/app/user/routes.py +++ b/app/user/routes.py @@ -1290,7 +1290,7 @@ def user_read_posts(sort=None): posts = posts.order_by(desc(Post.sticky)).order_by(desc(Post.ranking)).order_by(desc(Post.posted_at)) elif sort == 'top': posts = posts.filter(Post.posted_at > utcnow() - timedelta(days=7)).order_by(desc(Post.sticky)).order_by(desc(Post.up_votes - Post.down_votes)) - elif sort == 'newest': + elif sort == 'new': posts = posts.order_by(desc(Post.posted_at)) elif sort == 'oldest': posts = posts.order_by(asc(Post.posted_at))