Ñò ¯›—Ic @ s% d Z d d k Z d d k Z d d k Z d d k Z d d k l Z d d k l Z d d k l Z d d k Z d d k Z d Z e d d d d d e d d ƒ Z e d d d d d d d h d d 6d d 6ƒ Z e i e ƒ Z d e f d „ ƒ YZ e ƒ Z e i e i ƒ Z e i e ƒ d S( sM Configuration object and defaults setup The PylonsConfig object is initialized in pylons projects inside the :file:`config/environment.py` module. Importing the :data:`config` object from module causes the PylonsConfig object to be created, and setup in app-safe manner so that multiple apps being setup avoid conflicts. After importing :data:`config`, the project should then call :meth:`~PylonsConfig.init_app` with the appropriate options to setup the configuration. In the config data passed with :meth:`~PylonsConfig.init_app`, various defaults are set use with Paste and Routes. iÿÿÿÿN( t DispatchingConfig( t asbool( t MIMETypest makot charsets utf-8t errorst replacet decode_param_namest languages en-ust content_types text/htmlt strictt headerss no-caches Cache-Controlt Pragmat PylonsConfigc B sú e Z d Z h e d 6d d 6h d d 6d d 6g d 6d d 6d 6h d 6e d d d d ƒ d 6d d 6d d 6e i ƒ d 6e i ƒ d 6e d 6e d 6g d 6h d 6Z d „ Z d d d d d e d d d „ Z d d d „ Z d e d d „ Z d „ Z RS( s 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, and the paths for this instance. The config object is available in your application as the Pylons global :data:`pylons.config`. For example:: from pylons import config template_paths = config['pylons.paths']['templates'] There's several useful keys of the config object most people will be interested in: ``pylons.template_options`` Full dict of template options that any TG compatible plugin should be able to parse. Comes with basic config needed for Genshi, Mako, Myghty, and Kid. ``pylons.paths`` A dict of absolute paths that were defined in the applications ``config/environment.py`` module. ``pylons.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`` ``pylons.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`` ``pylons.default_charset`` Deprecated: Use the response_settings dict instead. Default character encoding specified to the browser via the 'charset' parameter of the HTTP response's Content-Type header. ``pylons.strict_c`` Whether or not the ``c`` object should throw an attribute error when access is attempted to an attribute that doesn't exist. ``pylons.request_options`` A dict of Content-Type related default settings for new instances of :class:`~pylons.controllers.util.Request`. May contain the values ``charset`` and ``errors`` and ``decode_param_names``. Overrides the Pylons default values specified by the ``request_defaults`` dict. ``pylons.response_options`` A dict of Content-Type related default settings for new instances of :class:`~pylons.controllers.util.Response`. May contain the values ``content_type``, ``charset`` and ``errors``. Overrides the Pylons default values specified by the ``response_defaults`` dict. ``routes.map`` Mapper object used for Routing. Yes, it is possible to add routes after your application has started running. t debugs pylons.packaget roott controllerst templatest static_filess pylons.pathss pylons.db_enginest sessions beaker.sessiont caches beaker.caches pylons.environ_configs pylons.gs pylons.hs pylons.request_optionss pylons.response_optionss pylons.strict_cs pylons.c_attach_argss buffet.template_enginess buffet.template_optionsc sà | d j o! d t f ‡ f d † ƒ Y} | Sˆ i ƒ } xQ d D]I } | | } | | j o, t i t i i | | f t d ƒ | | SqA W| d j o t S| d j o t St | | ƒ Sd S( Nt Configt FakeConfigc s5 e Z ‡ f d † Z ‡ f d † Z ‡ f d † Z RS( c s ˆ i | | Ž d S( N( t load_environment( t thist argst kwargs( t self( s8 /usr/lib/python2.6/site-packages/pylons/configuration.pyt __init__~ s c s t ˆ | ƒ S( N( t getattr( R t name( R ( s8 /usr/lib/python2.6/site-packages/pylons/configuration.pyt __getattr__€ s c s t ˆ | | ƒ d S( N( t setattr( R R t value( R ( s8 /usr/lib/python2.6/site-packages/pylons/configuration.pyt __setattr__‚ s ( t __name__t __module__R R R" ( ( R ( s8 /usr/lib/python2.6/site-packages/pylons/configuration.pyR } s t s pylons.s buffet.s routes.i t request_defaultst response_defaults( R% s pylons.s buffet.s routes.( t objectt current_conft warningst warnt pylonst legacyt config_attr_movedt DeprecationWarningR&