Files changed (1)
- Ignore whitespace
+The cpg module has been removed. If you attempt to start a CherryPy 2.0 application under CherryPy 2.1+, you'll see a traceback ending with this:
+The quick fix is to change "from cherrypy import cpg" to "import cherrypy as cpg". The longer fix is to change "from cherrypy import cpg" to "import cherrypy", and change all occurrences of "cpg" to "cherrypy".
+ * ''_cpconfig'' is now ''config''. However, you can also write "cherrypy.config" (as you used to write "cpg.config").
+ * ''cperror'' is now ''_cperror''. However, you can also raise "cherrypy.HTTPRedirect", "cherrypy.NotFound", etc.
+The config options are now stored in a dictionary called "cherrypy.config.configMap". It's a dictionary of dictionaries. The keys of the first dictionaries correspond to the PATH of the HTTP requests (except 'global', which is the default). This way you can use different configurations for different PATHs. The default value is:
+To update this dictionary, users should call cherrypy.config.update, either by passing an update dictionary, like this:
+Or by passing a file name, in which case !CherryPy will parse the INI file (see below for more on this format) and store the values in cherrypy.config.configMap, like this:
+'''Note that !CherryPy uses "unrepr" to parse the values in your config file, so you need to write them as python expressions (ex: "string", True, 1)'''
+[This example is in the !CherryPy tutorial directory as "tutorial.conf", or on-line at http://www.cherrypy.org/file/trunk/cherrypy/tutorial/tutorial.conf]
+If you were using cpg.configFile anywhere in your code to read custom values from the config file, you need to use cherrypy.config.get instead (if the option is under a [/path] section, or use cherrypy.config.configMap directly if you want)