(url, code=None)
Aborts execution and causes a 303 or 302 redirect, depending on
        the HTTP protocol version.
Aborts execution and causes a 303 or 302 redirect, depending on
        the HTTP protocol version.
Aborts execution and causes a 303 or 302 redirect depending on the HTTP protocol version .
def redirect(url, code=None):
    """ Aborts execution and causes a 303 or 302 redirect, depending on
        the HTTP protocol version. """
    if code is None:
        code = 303 if request.get('SERVER_PROTOCOL') == "HTTP/1.1" else 302
    location = urljoin(request.url, url)
    raise HTTPResponse("", status=code, Location=location)
def redirect ( url , code = None ) : if code is None : code = 303 if request . get ( 'SERVER_PROTOCOL' ) == "HTTP/1.1" else 302 location = urljoin ( request . url , url ) raise HTTPResponse ( "" , status = code , Location = location )