update post view, limit related_posts to max 6

This commit is contained in:
2020-10-28 00:22:42 +00:00
parent 95feb2b961
commit 6a0dda89cd
3 changed files with 23 additions and 20 deletions

View File

@@ -91,7 +91,7 @@ def show(request, id=None):
"post": p,
"author_image": author_image,
"next": get_next_dict(p),
"related_posts": p.tags.similar_objects(),
"related_posts": p.tags.similar_objects()[:6],
"ep_agenda_link": ep_agenda_link,
"ep_protocol_link": ep_protocol_link,
}