Karrigell/Redirect to a URL

From Wikibooks, open books for an open world
< Karrigell
Jump to: navigation, search

To perform an HTTP redirection to a URL, use the built-in exception HTTP_REDIRECTION :

def index():
    raise HTTP_REDIRECTION(other_url)