class documentation

class RequestRedirect(HTTPException, RoutingException):

View In Hierarchy

Raise if the map requests a redirect. This is for example the case if strict_slashes are activated and an url that requires a trailing slash.

The attribute new_url contains the absolute destination url.

Method __init__ Undocumented
Method get​_response Get a response object. If one was passed to the exception it's returned directly.
Class Variable code Undocumented
Instance Variable new​_url Undocumented

Inherited from HTTPException:

Class Method wrap Create an exception that is a subclass of the calling HTTP exception and the exception argument.
Method __call__ Call the exception as WSGI application.
Method __repr__ Undocumented
Method __str__ Undocumented
Method get​_body Get the HTML body.
Method get​_description Get the description.
Method get​_headers Get a list of headers.
Instance Variable description Undocumented
Instance Variable response Undocumented
Property name The status name.
def __init__(self, new_url):

Undocumented

Parameters
new​_url:strUndocumented
def get_response(self, environ=None, scope=None):
Get a response object. If one was passed to the exception it's returned directly.
Parameters
environ:t.Optional[t.Union[WSGIEnvironment, Request]]the optional environ for the request. This can be used to modify the response depending on how the request looked like.
scope:t.Optional[dict]Undocumented
Returns
Responsea Response object or a subclass thereof.
code: int =
new_url =

Undocumented