def token_view(request):
 context = RequestContext(request, processors=[csrf])
 template = Template(u'{% csrf_token %}')
 return HttpResponse(template.render(context))

def token_view ( request ) : context = RequestContext ( request , processors = [ csrf ] ) template = Template ( u'{% csrf_token %}' ) return HttpResponse ( template . render ( context ) )
a view that uses {% csrf_token %} .