Chapter 3.4. Understanding CherryPy and TurboGears Controllers
At the center of a TurboGears application is CherryPy, responding to every user action and sending changes to the model and view.
In other words, CherryPy provides the controller part of the MVC paradigm in TurboGears, and that means that it is responsible for parsing user actions and passing state-change requests to your model objects. It also calls the view template and can pass it whatever data it needs to present to the user.
It sounds like a lot, but actually TurboGears makes writing controllers easy.
Although views can pull data from the model, many people prefer to gather up whatever the view needs and pass it into the view as a dictionary.
There are legitimate reasons to ...
Get Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.