Listing 2. views.py, with an Index Method from django.template import Context, loader from django.http import HttpResponse from blog.models import Posting from datetime import * def index(request): postings = Posting.objects.all().order_by("-publication_date") output = "" for posting in postings: output += "

%s

\n" % posting.title output += "

%s

\n" % posting.publication_date.isoformat() output += "

%s

\n\n\n" % posting.body return HttpResponse(output)