def redirectTo(URL, request):
 if isinstance(URL, unicode):
  raise TypeError('Unicode object not allowed as URL')
 request.setHeader('Content-Type', 'text/html; charset=utf-8')
 request.redirect(URL)
 content = ('\n<html>\n    <head>\n        <meta http-equiv="refresh" content="0;URL=%(url)s">\n    </head>\n    <body bgcolor="#FFFFFF" text="#000000">\n    <a href="%(url)s">click here</a>\n    </body>\n</html>\n' % {'url': nativeString(URL)})
 if _PY3:
  content = content.encode('utf8')
 return content

def redirectTo ( URL , request ) : if isinstance ( URL , unicode ) : raise TypeError ( 'Unicode object not allowed as URL' ) request . setHeader ( 'Content-Type' , 'text/html; charset=utf-8' ) request . redirect ( URL ) content = ( '\n<html>\n    <head>\n        <meta http-equiv="refresh" content="0;URL=%(url)s">\n    </head>\n    <body bgcolor="#FFFFFF" text="#000000">\n    <a href="%(url)s">click here</a>\n    </body>\n</html>\n' % { 'url' : nativeString ( URL ) } ) if _PY3 : content = content . encode ( 'utf8' ) return content
generate a redirect to the given location .