ķ
ņ|Đ`c           @   sN   d  d l  Z  d  d l m Z m Z d e f d     YZ d e  j d  Z d S(   i˙˙˙˙N(   t   asboolt   aslistt   SettingsConfiguratorMixinc           B   s&   e  Z d    Z d d  Z d   Z RS(   c         C   s1   | d  k r i  } n  t |  } | |  j _ | S(   N(   t   Nonet   Settingst   registryt   settings(   t   selft   mappingR   (    (    sP   /var/www/syncserver/local/lib/python2.7/site-packages/pyramid/config/settings.pyt   _set_settings   s
    	c         K   s]   | d k r i  } n  |  j j } | d k r? |  j |  } n  | j |  | j |  d S(   s(  Augment the :term:`deployment settings` with one or more
        key/value pairs.

        You may pass a dictionary::

           config.add_settings({'external_uri':'http://example.com'})

        Or a set of key/value pairs::

           config.add_settings(external_uri='http://example.com')

        This function is useful when you need to test code that accesses the
        :attr:`pyramid.registry.Registry.settings` API (or the
        :meth:`pyramid.config.Configurator.get_settings` API) and
        which uses values from that API.
        N(   R   R   R   R	   t   update(   R   R   t   kwt   utility(    (    sP   /var/www/syncserver/local/lib/python2.7/site-packages/pyramid/config/settings.pyt   add_settings   s    	c         C   s
   |  j  j S(   sŗ  
        Return a :term:`deployment settings` object for the current
        application.  A deployment settings object is a dictionary-like
        object that contains key/value pairs based on the dictionary passed
        as the ``settings`` argument to the
        :class:`pyramid.config.Configurator` constructor.

        .. note:: the :attr:`pyramid.registry.Registry.settings` API
           performs the same duty.
           (   R   R   (   R   (    (    sP   /var/www/syncserver/local/lib/python2.7/site-packages/pyramid/config/settings.pyt   get_settings'   s    N(   t   __name__t
   __module__R	   R   R   R   (    (    (    sP   /var/www/syncserver/local/lib/python2.7/site-packages/pyramid/config/settings.pyR      s   	c            sŪ    d k r i    n  t        j |   | j  d    d t t     f d  }    f d   } | d d t  | d d t  | d d  | d d	 t  | d d  | d
 d t  | d
 d  | d d t  | d d  | d d t  | d d t  | d d  | d d t  | d d  | d d t  | d d  x6  d   d  D] }   d p  d   | <qrW| d d t d  | d d t  | d d t  | d d t g     S(    sß    Deployment settings.  Update application settings (usually
    from PasteDeploy keywords) with framework-specific key/value pairs
    (e.g. find ``PYRAMID_DEBUG_AUTHORIZATION`` in os.environ and jam into
    keyword args).c         S   s0   |  g } |  j  d  s, | j d |   n  | S(   Ns   pyramid.(   t
   startswitht   append(   t   keyt   keys(    (    sP   /var/www/syncserver/local/lib/python2.7/site-packages/pyramid/config/settings.pyt
   expand_keyA   s    	c            sz   |    |   } x  | D] }  j  |      q W| rM  |      n  |       j   f d   | D  d  S(   Nc            s   i  |  ] }   |  q S(    (    (   t   .0t   k(   t   value(    sP   /var/www/syncserver/local/lib/python2.7/site-packages/pyramid/config/settings.pys
   <dictcomp>O   s   	 (   t   getR
   (   t   settings_keyt   env_keyt   type_t   defaultR   R   (   t   dt   egetR   (   R   sP   /var/www/syncserver/local/lib/python2.7/site-packages/pyramid/config/settings.pyt   SG   s    c            s3   x,  |   D] }   | p$   |   | <q Wd  S(   N(    (   R   t   override_keyR   (   R   R   (    sP   /var/www/syncserver/local/lib/python2.7/site-packages/pyramid/config/settings.pyt   OQ   s    t	   debug_allt   PYRAMID_DEBUG_ALLt   debug_authorizationt   PYRAMID_DEBUG_AUTHORIZATIONt   debug_notfoundt   PYRAMID_DEBUG_NOTFOUNDt   debug_routematcht   PYRAMID_DEBUG_ROUTEMATCHt   debug_templatest   PYRAMID_DEBUG_TEMPLATESt
   reload_allt   PYRAMID_RELOAD_ALLt   reload_templatest   PYRAMID_RELOAD_TEMPLATESt   reload_assetst   PYRAMID_RELOAD_ASSETSt   reload_resourcest   PYRAMID_RELOAD_RESOURCESt   default_locale_namet   PYRAMID_DEFAULT_LOCALE_NAMEt   ent   prevent_http_cachet   PYRAMID_PREVENT_HTTP_CACHEt   prevent_cachebustt   PYRAMID_PREVENT_CACHEBUSTt   csrf_trusted_originst   PYRAMID_CSRF_TRUSTED_ORIGINSN(   R   t   dictR
   R   t   strt   FalseR    R   (   R   t	   _environ_R   R    R"   R   (    (   R   R   R   sP   /var/www/syncserver/local/lib/python2.7/site-packages/pyramid/config/settings.pyR   5   s>    			
(	   t   ost   pyramid.settingsR    R   t   objectR   R   t   environR   (    (    (    sP   /var/www/syncserver/local/lib/python2.7/site-packages/pyramid/config/settings.pyt   <module>   s   /