calendar is now only future events; posts include members and images
This commit is contained in:
@@ -41,11 +41,20 @@ def show(request, id=None):
|
||||
elif id != "" and id is not None:
|
||||
p = Post.objects.get(slug=(id))
|
||||
|
||||
from members.models import Member
|
||||
from easy_thumbnails.files import get_thumbnailer
|
||||
|
||||
|
||||
#post_author = p.author
|
||||
post_author = Member.all_members.filter(nickname=p.author)
|
||||
post_author_thumb_url = get_thumbnailer(post_author[0].image)['thumb'].url
|
||||
|
||||
context = {
|
||||
"post": p,
|
||||
"next": get_next_dict().get(p.slug, None),
|
||||
"related_posts": p.tags.similar_objects(),
|
||||
"ep_link": get_pad_link(p.slug + "-agenda")
|
||||
"ep_link": get_pad_link(p.slug + "-agenda"),
|
||||
"author_image": post_author_thumb_url
|
||||
}
|
||||
response = render(request, 'posts/show.html', context)
|
||||
response.set_cookie("HelloWorld", "TestWert", domain="https://etherpad2.2020.fet.at")
|
||||
|
||||
Reference in New Issue
Block a user