Home | Trees | Index | Help |
|
---|
Package twisted :: Package web :: Package woven :: Module template :: Class DOMTemplate |
|
Resource
--+
|
DOMTemplate
Method Summary | |
---|---|
| |
Check a given result from handling a node and hand it to a process* method which will convert the result into a node and insert it into the DOM tree. | |
Deal with a callback from a deferred, dispatching the result and recursing children. | |
Override this if you want to have your subclass look up its template using a different method. | |
Handle the root node, and send the page if there are no outstanding callbacks when it returns. | |
Handle a single node by looking up a method for it, calling the method and dispatching the result. | |
Use acquisition to look up the template named by self.templateFile, located anywhere above this object in the heirarchy, and use it as the template. | |
If this node has children, handle them. | |
Render a given resource. | |
renderFailure(self,
failure,
request)
| |
Send the results of the DOM mutation to the browser. | |
setUp(self,
request,
document)
| |
Inherited from Resource | |
| |
Retrieve a 'child' resource from me. | |
| |
Retrieve a static or dynamically generated child resource from me. | |
| |
| |
| |
| |
| |
| |
| |
| |
Register a static child. | |
|
Class Variable Summary | |
---|---|
tuple |
__implements__ = (<class twisted.web.resource.IResource ...
|
NoneType |
_cachedTemplate = None |
int |
isLeaf = 1 |
str |
template = ''
|
str |
templateDirectory = ''
|
str |
templateFile = ''
|
Inherited from Resource | |
NoneType |
server = None |
Method Details |
---|
__init__(self,
templateFile=None)
|
dispatchResult(self, request, node, result)Check a given result from handling a node and hand it to a process* method which will convert the result into a node and insert it into the DOM tree. Return the new node. |
dispatchResultCallback(self, result, request, node)Deal with a callback from a deferred, dispatching the result and recursing children. |
getTemplate(self, request)Override this if you want to have your subclass look up its template using a different method. |
handleDocument(self, request, document)Handle the root node, and send the page if there are no outstanding callbacks when it returns. |
handleNode(self, request, node)Handle a single node by looking up a method for it, calling the method and dispatching the result. Also, handle all childNodes of this node using recursion. |
lookupTemplate(self, request)Use acquisition to look up the template named by self.templateFile, located anywhere above this object in the heirarchy, and use it as the template. The first time the template is used it is cached for speed. |
recurseChildren(self, request, node)If this node has children, handle them. |
render(self, request)Render a given resource. This must be implemented in all subclasses of Resource. The return value of this method will be the rendered page, unless the return value is twisted.web.server.NOT_DONE_YET, in which case it is this class's responsibility to write the results to request.write(data), then call request.finish().
|
sendPage(self, request)Send the results of the DOM mutation to the browser. |
Class Variable Details |
---|
__implements__
|
_cachedTemplate
|
isLeaf
|
template
|
templateDirectory
|
templateFile
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Tue Dec 9 17:48:14 2003 | http://epydoc.sf.net |