Commits

Anonymous committed 46bec4d

Changed page UpgradeTo30

Comments (0)

Files changed (1)

 
 === Configuration ===
 
-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); cherrypy.config is now for global entries only (things which affect all applications). Second, 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 applicable in the global config, the application config, or both:
+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||
-||engine||X|| ||
-||hooks||X||X||
-||log||X||X*||
-||request|| ||X||
-||response|| ||X||
-||server||X|| ||
-||tools||X||X||
-
-[* "log" entries must be specified under the URL "/" when used in application config. That is, log config is per-application, not per-path.]
+||Scope||Global||Application Root||App Path||
+||engine||X|| || ||
+||hooks||X||X||X||
+||log||X||X|| ||
+||request||X||X||X||
+||response||X||X||X||
+||server||X|| || ||
+||tools||X||X||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.