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 += "<h1>%s</h1>\n" % posting.title
        output += "<h2>%s</h2>\n" % posting.publication_date.isoformat()
        output += "<p>%s</p>\n\n\n" % posting.body

    return HttpResponse(output)