All pastes #248498 Raw Edit

Untitled

public text v1 · immutable
#248498 ·published 2006-11-14 18:56 UTC
rendered paste body
from django.template import Context, loader
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response


def commentary(request):
    if request.method == "POST":
        t = loader.get_template('scratchpad/commentary-on-clark-2002.html')
        c = Context()
        content = t.render(c)
        return HttpResponse(content)
    else:
        return render_to_response('scratchpad/commentary-button.html')