This commit is contained in:
2020-12-11 22:30:28 +00:00
12 changed files with 53 additions and 22 deletions

View File

@@ -67,11 +67,13 @@ def show(request, id=None):
elif id != "" and id is not None:
p = Post.objects.get(slug=(id))
post_author = Member.all_members.filter(nickname=p.author).first()
post_author = Member.all_members.filter(username=p.author).first()
author_image = None
author = None
if post_author:
author_image = post_author.image['avatar'].url
author = post_author
ep_agenda_link = "#"
ep_protocol_link = "#"
@@ -92,6 +94,7 @@ def show(request, id=None):
context = {
"post": p,
"author": author,
"author_image": author_image,
"next": get_next_dict(p),
"related_posts": p.tags.similar_objects()[:6],