Class: InputHandler | Twisted-0.19.0/twisted/web/domhandlers.py | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A handler is like a controller, but it operates on something contained inside of self.model instead of directly on self.model. For example, a Handler whose id has been set to "foo" will handle self.model.foo The handler's job is to interpret the request and: 1) Check for valid input 2) If the input is valid, update the model 3) Use any special API of the view widget to change the view (other than what the view updates automatically from the model) e.g. in the case of an error, tell the view to report an error to the user 4) Return a success value; by default these values are simply recorded and the page is rendered, but these values could be used to determine what page to display next, etc
|