Configuration
While developing an application, you always need to parameterize it, so that it can be tuned as per the requirements of the hosting environment. For instance, the type of database used, PostgreSQL or MySQL, the directory in which the application resides, administrator contacts, etc.
There are different levels of configuration settings required in a web application like our photoblog:
Web server: Settings linked to the HTTP server
Engine: Settings associated with the engine hosting the application
Application: Settings our application will use
CherryPy—Web and Engine Configuration System
Since our application is using CherryPy, we will use the CherryPy configuration capabilities for the web server and the engine. CherryPy uses a configuration based on the syntax of the INI format defined by Microsoft.
The format of a CherryPy configuration file is as follows:
[section] key = value
The main difference between the original INI format and the format used by CherryPy is the fact that values...