Package twisted :: Package web :: Module resource :: Class IResource
[show private | hide private]
[frames | no frames]

Class IResource

object --+    
         |    
 Interface --+
             |
            IResource


A web resource.
Method Summary
  getChildWithDefault(self, name, request)
Return a child with the given name for the given request.
  putChild(self, path, child)
Put a child IResource implementor at the given path.
  render(self, request)
Render a request.
    Inherited from Interface
  adaptWith(self, using, to, registry)
(Class method)
    Inherited from object
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)
    Inherited from type
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T

Class Variable Summary
int isLeaf = 0                                                                     

Instance Method Details

getChildWithDefault(self, name, request)

Return a child with the given name for the given request. This is the external interface used by the Resource publishing machinery. If implementing IResource without subclassing Resource, it must be provided. However, if subclassing Resource, getChild overridden instead.

putChild(self, path, child)

Put a child IResource implementor at the given path.

render(self, request)

Render a request. This is called on the leaf resource for a request. Render must return either a string, which will be sent to the browser as the HTML for the request, or server.NOT_DONE_YET. If NOT_DONE_YET is returned, at some point later (in a Deferred callback, usually) call request.write("<html>") to write data to the request, and request.finish() to send the data to the browser.

Class Variable Details

isLeaf

Type:
int
Value:
0                                                                     

Generated by Epydoc 2.0 on Thu Dec 25 10:59:57 2003 http://epydoc.sf.net