The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ

Next/previous post links now omit drafts

master
Gergely Polonkai 8 years ago
parent d1ba92a621
commit eea5be4323
  1. 4
      blog/views.py

@ -76,8 +76,8 @@ def read(request, year, month, day, slug):
slug = slug,
draft = False
)
next_post = Post.objects.filter(created_at__gt = post.created_at).order_by('created_at')[0:1]
prev_post = Post.objects.filter(created_at__lt = post.created_at).order_by('-created_at')[0:1]
next_post = Post.objects.filter(created_at__gt = post.created_at, draft = False).order_by('created_at')[0:1]
prev_post = Post.objects.filter(created_at__lt = post.created_at, draft = False).order_by('-created_at')[0:1]
if not next_post:
next_post = None

Loading…
Cancel
Save