Part of twisted.web.woven.controller View Source View In Hierarchy
Known subclasses: twisted.web.woven.controller.LiveController, twisted.web.woven.input.InputHandler, twisted.web.woven.page.Page, twisted.web.woven.template.DOMController
Implements interfaces: twisted.web.woven.interfaces.IController
A Controller which handles to events from the user. Such events are `web request', `form submit', etc.
I should be the IResource implementor for your Models (andregisterControllerForModel
makes this so).
Method | __init__ | Initialize. |
Method | setupControllerStack | Undocumented |
Method | importControllerLibrary | No summary |
Method | getSubcontroller | Look for a controller named "controllerName" to handle the node "node". When a node <div controller="foo" /> is present in the template, this method will be called with controllerName set to "foo". |
Method | setSubcontrollerFactory | Set the callable "factory", which takes a model and should return an InputHandler, to be called by the default implementation of getSubview when the controllerName "name" is present in the template. |
Method | setView | Set the view that this controller is related to. |
Method | setNode | Undocumented |
Method | setUp | |
Method | getChild | No summary |
Method | getDynamicChild | No summary |
Method | wchild_index | By default, we return ourself as the index. Override this to provide different behavior for a URL that ends in a slash. |
Method | render | No summary |
Method | makeView | Undocumented |
Method | renderView | Undocumented |
Method | gatheredControllers | Undocumented |
Method | aggregateValid | Undocumented |
Method | aggregateInvalid | Undocumented |
Method | process | Undocumented |
Method | setSubmodel | Undocumented |
Method | handle | By default, we don't do anything |
Method | exit | We are done handling the node to which this controller was attached. |
Method | domChanged | Undocumented |
Method | pageRenderComplete | Override this to recieve notification when the view rendering process is complete. |
Inherited from Resource:
Method | listStaticNames | Undocumented |
Method | listStaticEntities | Undocumented |
Method | listNames | Undocumented |
Method | listEntities | Undocumented |
Method | listDynamicNames | Undocumented |
Method | listDynamicEntities | Undocumented |
Method | getStaticEntity | Undocumented |
Method | getDynamicEntity | Undocumented |
Method | delEntity | Undocumented |
Method | reallyPutEntity | Undocumented |
Method | getChildWithDefault | Retrieve a static or dynamically generated child resource from me. |
Method | getChildForRequest | Undocumented |
Method | putChild | Register a static child. |
Method | render_HEAD | Default handling of HEAD method. |
Look for a controller named "controllerName" to handle the node "node". When a node <div controller="foo" /> is present in the template, this method will be called with controllerName set to "foo".
Return None if this Controller doesn't want to provide a Subcontroller for the given name.Set the callable "factory", which takes a model and should return an InputHandler, to be called by the default implementation of getSubview when the controllerName "name" is present in the template.
This would generally be used like this:view.setSubcontrollerFactory("foo", MyFancyInputHandlerClass)This is equivalent to:
def wcfactory_foo(self, request, node, m): return MyFancyInputHandlerClass(m)Which will cause an instance of MyFancyInputHandlerClass to be instanciated when template node <div controller="foo" /> is encountered.
Parameters | request | (type: twisted.web.server.Request
) |
Parameters | name | The name of the child being requested. (type: string ) |
request | The HTTP request being handled.
(type: twisted.web.server.Request
) |
Parameters | name | The name of the child being requested. (type: string ) |
request | The HTTP request being handled.
(type: twisted.web.server.Request
) |