Commit 3006f89c authored by Titia de Castro's avatar Titia de Castro

updated announcements view

parent 39ee8f3a
from django.shortcuts import render from django.shortcuts import render
from django.http import HttpResponse from django.http import HttpResponse
from .models import Announcement
# Create your views here. # Create your views here.
def index(request): def index(request):
return HttpResponse("This is the Announcement Board!") formatted_announcements = "ANNOUCNEMENTS:<br>"
\ No newline at end of file
for announcement in Announcement.objects.all():
formatted_announcements += announcement.getAnnouncement() + "<br>"
return HttpResponse(formatted_announcements)
\ 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