Hidden posts are hidden in posts.
This commit is contained in:
@@ -103,12 +103,19 @@ def show(request, id=None):
|
|||||||
)
|
)
|
||||||
ep_protocol_link = "#"
|
ep_protocol_link = "#"
|
||||||
|
|
||||||
|
related_posts = p.tags.similar_objects()
|
||||||
|
|
||||||
|
# list of non 'is_hidden' posts for related_posts
|
||||||
|
for obj in related_posts:
|
||||||
|
if obj.is_hidden:
|
||||||
|
related_posts.remove(obj)
|
||||||
|
|
||||||
context = {
|
context = {
|
||||||
"post": p,
|
"post": p,
|
||||||
"author": author,
|
"author": author,
|
||||||
"author_image": author_image,
|
"author_image": author_image,
|
||||||
"next": get_next_dict(p),
|
"next": get_next_dict(p),
|
||||||
"related_posts": p.tags.similar_objects()[:6],
|
"related_posts": related_posts[0:6],
|
||||||
"ep_agenda_link": ep_agenda_link,
|
"ep_agenda_link": ep_agenda_link,
|
||||||
"ep_protocol_link": ep_protocol_link,
|
"ep_protocol_link": ep_protocol_link,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user