def displayResponse(request, openid_response):
 s = getServer(request)
 try:
  webresponse = s.encodeResponse(openid_response)
 except EncodingError as why:
  text = why.response.encodeToKVForm()
  return direct_to_template(request, 'server/endpoint.html', {'error': cgi.escape(text)})
 r = http.HttpResponse(webresponse.body)
 r.status_code = webresponse.code
 for (header, value) in webresponse.headers.iteritems():
  r[header] = value
 return r

def displayResponse ( request , openid_response ) : s = getServer ( request ) try : webresponse = s . encodeResponse ( openid_response ) except EncodingError as why : text = why . response . encodeToKVForm ( ) return direct_to_template ( request , 'server/endpoint.html' , { 'error' : cgi . escape ( text ) } ) r = http . HttpResponse ( webresponse . body ) r . status_code = webresponse . code for ( header , value ) in webresponse . headers . iteritems ( ) : r [ header ] = value return r
display an openid response .