Chapter 17.2. CherryPy and the HTTP Request/Response Cycle

As you will see in Chapter 18, “TurboGears Deployment,” you can run TurboGears applications directly on CherryPy, or behind ModPython, ModProxy, or behind any server that supports the Web Server Gateway Interface (WSGI) specification. But no matter how you configure the front end, CherryPy is still responsible for handling the incoming requests and creating the final responses to go out to the user.

The exact methods that CherryPy uses are probably not important, but it is often important that you know how to access the various request properties, and how to set response parameters. Luckily, the cherrypy.request and cherrypy.response objects provide easy access to each of these items. ...

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.