class documentation

class ParentRedirect(resource.Resource): (source)

View In Hierarchy

Redirect to the nearest directory and strip any query string.

This generates redirects like:

    /              →  /
    /foo           →  /
    /foo?bar       →  /
    /foo/          →  /foo/
    /foo/bar       →  /foo/
    /foo/bar?baz   →  /foo/

However, the generated Location header contains an absolute URL rather than a path.

The response is the same regardless of HTTP method.

Method render Respond to all requests by redirecting to nearest directory.
Class Variable is​Leaf Signal if this IResource implementor is a "leaf node" or not. If True, getChildWithDefault will not be called on this Resource.

Inherited from Resource:

Method __init__ Initialize.
Method del​Entity Undocumented
Method get​Child Retrieve a 'child' resource from me.
Method get​Child​For​Request Undocumented
Method get​Child​With​Default Retrieve a static or dynamically generated child resource from me.
Method get​Dynamic​Entity Undocumented
Method get​Static​Entity Undocumented
Method list​Dynamic​Entities Undocumented
Method list​Dynamic​Names Undocumented
Method list​Entities Undocumented
Method list​Names Undocumented
Method list​Static​Entities Undocumented
Method list​Static​Names Undocumented
Method put​Child Register a static child.
Method really​Put​Entity Undocumented
Method render_​HEAD Default handling of HEAD method.
Class Variable server Undocumented
Instance Variable children Undocumented
def render(self, request): (source)
Respond to all requests by redirecting to nearest directory.
Returns
bytesUndocumented
isLeaf: int = (source)
Signal if this IResource implementor is a "leaf node" or not. If True, getChildWithDefault will not be called on this Resource.