%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python27/lib/python2.7/site-packages/beaker/
Upload File :
Create Path :
Current File : //opt/alt/python27/lib/python2.7/site-packages/beaker/middleware.pyo

�
^��Jc@s�ddlZy2ddlmZedd�Zedd�ZWndZdZnXddlmZddlm	Z	m
Z
ddlmZm
Z
mZd	efd
��YZdefd��YZd
�Zd�ZdS(i����N(tStackedObjectProxytnamesBeaker Sessions
Cache Manager(tCacheManager(tSessiont
SessionObject(tcoerce_cache_paramstcoerce_session_paramstparse_cache_config_optionstCacheMiddlewarecBs&eZeZddd�Zd�ZRS(sbeaker.cachecKs�||_|pi}i|_|jjt|��|jjt|dt��|jrl|rl||_n|jj|�t|j�|_||_dS(s�Initialize the Cache Middleware
        
        The Cache middleware will make a Cache instance available
        every request under the ``environ['beaker.cache']`` key by
        default. The location in environ can be changed by setting
        ``environ_key``.
        
        ``config``
            dict  All settings should be prefixed by 'cache.'. This
            method of passing variables is intended for Paste and other
            setups that accumulate multiple component settings in a
            single dictionary. If config contains *no cache. prefixed
            args*, then *all* of the config options will be used to
            intialize the Cache objects.
        
        ``environ_key``
            Location where the Cache instance will keyed in the WSGI
            environ
        
        ``**kwargs``
            All keyword arguments are assumed to be cache settings and
            will override any settings found in ``config``

        tinclude_defaultsN(tapptoptionstupdateRtFalseRt
cache_managertenviron_key(tselfR
tconfigRtkwargs((sB/opt/alt/python27/lib/python2.7/site-packages/beaker/middleware.pyt__init__s			cCs\|jd�r<|djr<|dj|j|j�q<n|j||j<|j||�S(Nspaste.registry(tgettreglisttregistertcacheRRR
(Rtenvirontstart_response((sB/opt/alt/python27/lib/python2.7/site-packages/beaker/middleware.pyt__call__Cs
N(t__name__t
__module__tbeaker_cacheRtNoneRR(((sB/opt/alt/python27/lib/python2.7/site-packages/beaker/middleware.pyRs/tSessionMiddlewarecBs/eZeZddd�Zd�Zd�ZRS(sbeaker.sessioncKsA|p	i}tdtdddddddddddd�|_x�||gD]�}x�|j�D]�\}}|jd	�r�||j|d
<n|jd�r�||j|d<n|jd
�rbtjdtd�||j|d<qbqbWqOWt	|j�|jr|r||_n|jj
|�||_||_dS(s�Initialize the Session Middleware
        
        The Session middleware will make a lazy session instance
        available every request under the ``environ['beaker.session']``
        key by default. The location in environ can be changed by
        setting ``environ_key``.
        
        ``config``
            dict  All settings should be prefixed by 'session.'. This
            method of passing variables is intended for Paste and other
            setups that accumulate multiple component settings in a
            single dictionary. If config contains *no cache. prefixed
            args*, then *all* of the config options will be used to
            intialize the Cache objects.
        
        ``environ_key``
            Location where the Session instance will keyed in the WSGI
            environ
        
        ``**kwargs``
            All keyword arguments are assumed to be session settings and
            will override any settings found in ``config``

        tinvalidate_corruptttypetdata_dirtkeysbeaker.session.idttimeouttsecrettlog_filesbeaker.session.issession.itsession_s?Session options should start with session. instead of session_.iN(
tdicttTrueRRt	iteritemst
startswithtwarningstwarntDeprecationWarningRRtwrap_appR(RR/RRRtdctR#tval((sB/opt/alt/python27/lib/python2.7/site-packages/beaker/middleware.pyROs(	

	cs�t||j��|jd�rK|djrK|dj|j��qKn�||j<|j|d<d��fd�}|j	||�S(Nspaste.registrysbeaker.get_sessioncsj�j�rZ�j��jddrZ�jdd}|rW|jd|f�qWqZn�|||�S(Nt_headerst
set_cookiet
cookie_outs
Set-cookie(taccessedtpersistt__dict__tappend(tstatustheaderstexc_infotcookie(tsessionR(sB/opt/alt/python27/lib/python2.7/site-packages/beaker/middleware.pytsession_start_response�s
(
RRRRRR=Rt_get_sessionRR/(RRRR>((R=RsB/opt/alt/python27/lib/python2.7/site-packages/beaker/middleware.pyR�s


cCstidt|j�S(Ntuse_cookies(RR
R(R((sB/opt/alt/python27/lib/python2.7/site-packages/beaker/middleware.pyR?�sN(RRtbeaker_sessionR=RRRR?(((sB/opt/alt/python27/lib/python2.7/site-packages/beaker/middleware.pyRLs9	cs��fd�}|S(Ncst|���S(N(R(R
(tglobal_confR(sB/opt/alt/python27/lib/python2.7/site-packages/beaker/middleware.pytfilter�s((RBRRC((RBRsB/opt/alt/python27/lib/python2.7/site-packages/beaker/middleware.pytsession_filter_factory�scKst|||�S(N(R(R
RBR((sB/opt/alt/python27/lib/python2.7/site-packages/beaker/middleware.pytsession_filter_app_factory�s(R,tpaste.registryRRARRtbeaker.cacheRtbeaker.sessionRRtbeaker.utilRRRtobjectRRRDRE(((sB/opt/alt/python27/lib/python2.7/site-packages/beaker/middleware.pyt<module>s
;R	

Zerion Mini Shell 1.0