Commit 1066914b authored by mantlei's avatar mantlei

made it so that the output looks more like the example in the pdf

parent ac60d6b3
...@@ -6,9 +6,9 @@ import datetime ...@@ -6,9 +6,9 @@ import datetime
def index(request): def index(request):
overall_board = "<html><title>Announcement Board</title><body>" \ overall_board = "<html><title>Announcement Board</title><body>" \
"<h1> Widget's Announcement Board</h1>" "<h1> Widget's Announcement Board</h1>"
overall_board += "Announcements:"
for announcement in Announcement.objects.all(): for announcement in Announcement.objects.all():
overall_board += "<p><b>Announcements:<br>" overall_board += "<br>%s by " %announcement.title
overall_board += "%s by " %announcement.title
overall_board += "%s " %announcement.author.first_name overall_board += "%s " %announcement.author.first_name
overall_board += "%s published " %announcement.author.last_name overall_board += "%s published " %announcement.author.last_name
overall_board += "%s, " %announcement.pub_datetime.date().strftime("%m/%d/%Y") overall_board += "%s, " %announcement.pub_datetime.date().strftime("%m/%d/%Y")
......
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