Commit 38469afd authored by Jiuvi Anne Hu's avatar Jiuvi Anne Hu

Fixed error in .views

parent 24f3c55b
......@@ -14,8 +14,8 @@ def convert_to_localtime(utctime):
def index(request):
html_string_1 = '<html lang="en"><head><meta charset="UTF-8"></head>\
<b><h1>"Widget\'s Announcement Board"</h1></b><br/>\
<h2>"Announcements:"</h2><br/>'
<b><h1>Widget\'s Announcement Board</h1></b>\
<h2>Announcements:</h2><br/>'
html_string_2 = ""
for announced in Announcement.objects.all():
......@@ -23,8 +23,8 @@ def index(request):
{}".format(announced.title, announced.author.first_name,
announced.author.last_name,
convert_to_localtime(announced.pub_datetime), announced.body)
for reacts in announced.reaction.all():
html_string_2 += "{}: {}".format(reacts.name, reacts.tally)
for reacts in announced.reaction.all():
html_string_2 += "{}: {}".format(reacts.name, reacts.tally)
html_string_final = html_string_1 + html_string_2 + "</html>"
......
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