t.w.r.LeafResource(RenderMixin) : class documentation

Part of twisted.web2.resource View Source View In Hierarchy

Known subclasses: twisted.web2.plugin.NoPlugin, twisted.web2.plugin.TestResource, twisted.web2.resource.RedirectResource, twisted.web2.twcgi.CGIScript, twisted.web2.twscgi.SCGIClientResource

Implements interfaces: twisted.web2.iweb.IResource

A Resource with no children.
Method locateChild Locate another object which can be adapted to IResource.

Inherited from RenderMixin:

Method allowedMethods
Method checkPreconditions No summary
Method renderHTTP See iweb.IResource.renderHTTP.
Method http_OPTIONS Respond to a OPTIONS request. @param request: the request to process. @return: an object adaptable to iweb.IResponse.
Method http_TRACE Respond to a TRACE request. @param request: the request to process. @return: an object adaptable to iweb.IResponse.
Method http_HEAD Respond to a HEAD request. @param request: the request to process. @return: an object adaptable to iweb.IResponse.
Method http_GET Respond to a GET request.
Method render No summary
def locateChild(self, request, segments): (source)
Locate another object which can be adapted to IResource.
Returns

A 2-tuple of (resource, remaining-path-segments), or a deferred which will fire the above.

Causes the object publishing machinery to continue on with specified resource and segments, calling the appropriate method on the specified resource.

If you return (self, server.StopTraversal), this instructs web2 to immediately stop the lookup stage, and switch to the rendering stage, leaving the remaining path alone for your render function to handle.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 15:57:47.