Latest Version: 0.9.6.2

Warning

This documentation does not refer to the most recent version of Pylons. Current Documentation

config

Configuration setup for Myghty, and Paste error middleware

This module supplies pylons_config which handles setting up defaults for Myghty, Paste errorware, and prefixing Routes if necessary.


Classes

C Config(...) ...

Pylons configuration object

The Pylons configuration object is a per-application instance object that retains the information regarding the global and app conf's as well as per-application instance specific data such as the mapper, the paths for this instance, and the myghty configuration.

The Config object is available in your application as a Pylons global pylons_config under the g object. There's several useful attributes of the config object most people will be interested in:

myghty
The myghty configuration dict that was used to initialize Myghty
map
Mapper object used for Routing. Yes, it is possible to add routes after your application has started running.
paths
An array of absolute paths that were defined in the applications config/environment.py module.
global_conf
Global configuration passed in from Paste, this corresponds to the DEFAULTS section in the config file.
app_conf
Application specific configuration directives, passed in via Paste from the app section of the config file.
environ_config
Dict of environ keys for where in the environ to pickup various objects for registering with Pylons. If these are present then PylonsApp will use them from environ rather than using default middleware from Beaker. Valid keys are: session, cache
template_engines
List of template engines to configure. The first one in the list will be configured as the default template engine. Each item in the list is a dict indicating how to configure the template engine with keys: engine, template_root, template_options, and alias

This class contains 3 members.

See the source for more information.

Top