during request/response cycle Caching Encoding Sessions & cookies Authorization Uploads Static content No ORM / no templating / no forms Seth House <[email protected]> (Utah Python) CherryPy 2013-05-09 11 / 28
URI) Set cherrypy.request.handler Wraps handler Collect config in cherrypy.request.config Extremely open-ended Use a custom by setting request.dispatch http://docs.cherrypy.org/stable/refman/ _cpdispatch.html Seth House <[email protected]> (Utah Python) CherryPy 2013-05-09 17 / 28
Replace on the fly Must have exposed=True attribute .index attribute will take precedence default callable as fallback Seth House <[email protected]> (Utah Python) CherryPy 2013-05-09 19 / 28
Replace on the fly Must have exposed=True attribute .index attribute will take precedence default callable as fallback POST data available as kwargs: class MyHandler(object): def search(self, q, lang, page): # do something with ‘‘q‘‘ Seth House <[email protected]> (Utah Python) CherryPy 2013-05-09 19 / 28
/ enable in the config: [/images] tools.staticdir.on: True Some usable as handler Directly callable Seth House <[email protected]> (Utah Python) CherryPy 2013-05-09 21 / 28