Commit a0c586b4 authored by Andre Dalwin C. Tan's avatar Andre Dalwin C. Tan 💬

modified models and views to remove any references between ForumPost and Reply model.

parent 030df003
...@@ -22,9 +22,7 @@ def forum(request): ...@@ -22,9 +22,7 @@ def forum(request):
post.pub_datetime.strftime("%m/%d/%Y, %I:%M %p"), post.pub_datetime.strftime("%m/%d/%Y, %I:%M %p"),
post.body, post.body,
) )
# Check if reply is for that specific forum_post
for reply in replies: for reply in replies:
if reply.forum == post:
forum_view += ''' forum_view += '''
Reply by {} posted {}: <br> Reply by {} posted {}: <br>
{} <br> {} <br>
...@@ -33,5 +31,4 @@ def forum(request): ...@@ -33,5 +31,4 @@ def forum(request):
reply.pub_datetime.strftime("%m/%d/%Y, %I:%M %p"), reply.pub_datetime.strftime("%m/%d/%Y, %I:%M %p"),
reply.body reply.body
) )
forum_view += "<br>"
return HttpResponse(forum_view) return HttpResponse(forum_view)
\ No newline at end of file
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