Ñò ¯›—Ic@s%dZddkZddkZddkZddkZddklZddklZddk l Z ddk Z ddk Z dZeddd d d ed d ƒZeddddd ddhdd6dd6ƒZeieƒZdefd„ƒYZeƒZeieiƒZeieƒdS(sMConfiguration 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(tDispatchingConfig(tasbool(t MIMETypestmakotcharsetsutf-8terrorstreplacetdecode_param_namestlanguagesen-ust content_types text/htmltstricttheaderssno-caches Cache-ControltPragmat PylonsConfigc BsúeZdZh ed6dd6hdd6dd6gd6dd6d6hd6ed d d d ƒd 6dd6dd6eiƒd6eiƒd6ed6e d6gd6hd6Z d„Z dddddeddd„Z ddd„Z dedd„Zd„ZRS(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. tdebugspylons.packagetroott controllerst templatest static_filess pylons.pathsspylons.db_enginestsessionsbeaker.sessiontcaches beaker.cachespylons.environ_configspylons.gspylons.hspylons.request_optionsspylons.response_optionsspylons.strict_cspylons.c_attach_argssbuffet.template_enginessbuffet.template_optionscsÃ|djo!dtf‡fd†ƒY}|Sˆiƒ}xQd D]I}||}||jo,titii||ftdƒ||SqAW|d jotS|d jot St ||ƒSdS( NtConfigt FakeConfigcs5eZ‡fd†Z‡fd†Z‡fd†ZRS(csˆi||ŽdS(N(tload_environment(tthistargstkwargs(tself(s8/usr/lib/python2.6/site-packages/pylons/configuration.pyt__init__~scs tˆ|ƒS(N(tgetattr(Rtname(R(s8/usr/lib/python2.6/site-packages/pylons/configuration.pyt __getattr__€scstˆ||ƒdS(N(tsetattr(RRtvalue(R(s8/usr/lib/python2.6/site-packages/pylons/configuration.pyt __setattr__‚s(t__name__t __module__RRR"((R(s8/usr/lib/python2.6/site-packages/pylons/configuration.pyR}stspylons.sbuffet.sroutes.itrequest_defaultstresponse_defaults(R%spylons.sbuffet.sroutes.( tobjectt current_conftwarningstwarntpylonstlegacytconfig_attr_movedtDeprecationWarningR&R'R(RRRt conf_dicttprefixt full_name((Rs8/usr/lib/python2.6/site-packages/pylons/configuration.pyRzs        c Cs titiitdƒtiti ƒ} |o|| dtitii t d d d |ƒtd ƒ|| dd NR1is routes.mapRtemail_tot error_emailt error_logt smtp_servert localhostterror_subject_prefixsWebApp Error: t from_addressterror_email_fromspylons@yourapp.comt error_messages!An internal server error occurredt raise_errorspylons.response_optionsRtoutput_encodings pylons.pathsRtcomponent_roott allow_globalstmyghty_data_dirsUOld config option found in ini file, replace 'myghty_data_dir' option with 'data_dir'tdata_dirt cache_dirsbeaker.session.data_dirtsessionssbeaker.cache.data_dirRsmyghty.tsession_tcache_scache.issession.isbuffet.template_optionssmako.directoriessmako.filesystem_checkssmako.output_encodingsmako.module_directorysutf-8skid.assume_encodings kid.encodingt pylonsmyghtyRR%tgenshitkidspylons.packages .templatestcheetahs %s.templatess:Loaded %s template engine as the default template rendererROspylons.cache_dirspylons.errorware(RlRm($R)RtinitR6R7R R8t iteritemst setdefaulttgetR*R+R,R-tprefix_warningR/R1tFalset _created_regsRR:tTruetostpathtbasenametextendt templatingt PYLONS_VARStjoint startswithtitemsR9RNRJRRS(RRVREtkeytvalR1R>t errorwaretmyghty_defaultst_[1]Rxtmyghty_template_optionstktvR8((s8/usr/lib/python2.6/site-packages/pylons/configuration.pyRU<s¬            9             !            N(R#R$t__doc__RtR:R<R&R6R'RvR8RRRNtdefault_template_engineRWRU(((s8/usr/lib/python2.6/site-packages/pylons/configuration.pyR (s8=          ?C(RˆR6tloggingRwR*t paste.configRtpaste.deploy.convertersRtwebhelpers.mimehelperRt pylons.legacyR,tpylons.templatingR‰R<RtR&R't getLoggerR#RJR RMR7R8tinitial_configRT(((s8/usr/lib/python2.6/site-packages/pylons/configuration.pyts,          ÿ—