Package turbogears :: Module config

Module config

source code

TurboGears configuration

Functions
 
update_config(configfile=None, modulename=None)
Update the system configuration from given config file and/or module.
source code
 
update(configvalues)
Update the configuration with values from a dictionary.
source code
 
get(key, *args)
Get a config setting.
source code
Function Details

update_config(configfile=None, modulename=None)

source code 

Update the system configuration from given config file and/or module.

'configfile' is a ConfigObj (INI-style) config file, 'modulename' a module path in dotted notation. The function looks for files with a ".cfg" extension if the given module name refers to a package directory or a file with the base name of the right-most part of the module path and a ".cfg" extension added.

If both 'configfile' and 'modulname' are specified, the module is read first, followed by the config file. This means that the config file's options override the options in the module file.

update(configvalues)

source code 

Update the configuration with values from a dictionary.

The values are sent to the appropriate config system (server, app, or logging) automatically.

get(key, *args)

source code 

Get a config setting.

Uses request.config if available, otherwise defaults back to the server's config settings.