Commit ccb43ba0 authored by Lance Cedric Tan's avatar Lance Cedric Tan

Populated forum models and fixed its view

parent 2f63d4da
No preview for this file type
...@@ -12,7 +12,7 @@ def index(request): ...@@ -12,7 +12,7 @@ def index(request):
post.pub_datetime.strftime('%m/%d/%Y, %H:%M %p'), post.body post.pub_datetime.strftime('%m/%d/%Y, %H:%M %p'), post.body
) )
for reply in Reply.objects.all(): for reply in Reply.objects.all():
if reply.forum_post==post.title: if reply.forum_post.title==post.title:
page_content += 'Reply by {} {} posted {}:<br>{}<br>'.format( page_content += 'Reply by {} {} posted {}:<br>{}<br>'.format(
reply.author.first_name, reply.author.last_name, reply.author.first_name, reply.author.last_name,
reply.pub_datetime.strftime('%m/%d/%Y, %H:%M %p'), reply.pub_datetime.strftime('%m/%d/%Y, %H:%M %p'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment