B
aNG, @ s& d Z ddlmZ ddlZddlZddlZddlZddlZddlZyddl Z W n e
k
rh ddlZ Y nX yddlm
Z
W n e
k
r ddl
m
Z
Y nX ddlmZ ddlmZ G dd deZG d d
d
eZdadaejdd
aG dd deZG dd deZe ZeeeeefddZdS )a
Creates a session object in your WSGI environment.
Use like:
..code-block:: Python
environ['paste.session.factory']()
This will return a dictionary. The contents of this dictionary will
be saved to disk when the request is completed. The session will be
created when you first fetch the session dictionary, and a cookie will
be sent in that case. There's current no way to use sessions without
cookies, and there's no way to delete a session except to clear its
data.
@@: This doesn't do any locking, and may cause problems when a single
session is accessed concurrently. Also, it loads and saves the
session for each request, with no caching. Also, sessions aren't
expired.
)SimpleCookieN)md5)wsgilib)requestc @ s e Zd ZdddZdd ZdS )SessionMiddlewareNc K s || _ || _d S )N)application
factory_kw)selfr global_confr r >/opt/alt/python37/lib/python3.7/site-packages/paste/session.py__init__/ s zSessionMiddleware.__init__c sb t |f| j|d<