Anonymous committed 2f5d271

Changed page UpgradeTo30

  • Participants
  • Parent commits da0e65f

Comments (0)

Files changed (1)


-[This document is complete up to rev 1400.]
+[This document is complete up to rev 1430.]
 == How to upgrade to CherryPy 3.0 ==
 In CherryPy 2.2, configuration entries for the server, the application, and the request process were all mixed together. In CherryPy 3.0, they have been separated by two mechanisms. First, each mounted application now has its own config (which is usually provided in the tree.mount call); this holds per-application config (in a "/" section) and per-path config. Second, cherrypy.config is now for global entries only (things which affect all applications). Third, all config names are now of the form "namespace.key", where "namespace" is one of the following: "engine", "hooks", "log", "request", "response", "server", "tools". Entries from each namespace may be placed in the global, application root ("/") or per-path config, or a combination:
-||Scope||Global||Application Root||App Path||
-||engine||X|| || ||
-||log||X||X|| ||
+||Scope   ||Global||Application Root||App Path||
+||engine  ||X|| || ||
+||hooks   ||X||X||X||
+||log     ||X||X|| ||
+||request ||X||X||X||
-||server||X|| || ||
+||server  ||X|| || ||
+||tools   ||X||X||X||
+||wsgi    || ||X|| ||
 In addition to specifying config entries in a config file, you may now attach config data directly to page handlers or their containers via the {{{_cp_config}}} attribute (a dict). This attribute (in conjunction with hooks and tools, see below) replaces the old {{{_cp_filters}}}, {{{_cp_on_error}}}, and {{{_cp_on_http_error}}} attributes. Note that {{{_cp_config}}} entries apply to each ''handler'' (or branch in the CherryPy tree), whereas entries in config files apply based on the ''URI'', which is not always mapped 1:1 with handlers.