(url, code=302)
Raises a redirect exception to the specified URL

    Optionally, a code variable may be passed with the status code of
    the redirect, ie::

        redirect(url(controller='home', action='index'), code=303)
Raises a redirect exception to the specified URL
Raises a redirect exception to the specified URL
def redirect(url, code=302):
    """Raises a redirect exception to the specified URL

    Optionally, a code variable may be passed with the status code of
    the redirect, ie::

        redirect(url(controller='home', action='index'), code=303)

    """
    log.debug("Generating %s redirect" % code)
    exc = status_map[code]
    raise exc(location=url.encode('utf-8'))
def redirect ( url , code = 302 ) : log . debug ( "Generating %s redirect" % code ) exc = status_map [ code ] raise exc ( location = url . encode ( 'utf-8' ) )