|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /usr/lib64/python2.7/site-packages/django/contrib/sessions/backends/ |
Upload File : |
�
r�\c @ s� d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z m
Z
m Z d d l m
Z
m Z d d l m Z d d l m Z d d l m Z d e f d � � YZ d S(
i����N( t settings( t SessionBaset CreateErrort VALID_KEY_CHARS( t SuspiciousOperationt ImproperlyConfigured( t timezone( t
force_text( t InvalidSessionKeyt SessionStorec B s� e Z d Z d d � Z e d � � Z d d � Z d � Z d � Z d � Z
e d � Z d � Z
d d � Z d
� Z e d � � Z RS(
s0
Implements a file based session store.
c C s; t | � j � | _ t j | _ t t | � j | � d S( N( t typet _get_storage_patht storage_pathR t SESSION_COOKIE_NAMEt file_prefixt superR t __init__( t selft session_key( ( sG /tmp/pip-install-XxeQeY/django/django/contrib/sessions/backends/file.pyR s c C sy y | j SWng t k
rt t t d d � } | sB t j � } n t j j | � sg t
d | � � n | | _ | SXd S( Nt SESSION_FILE_PATHs� The session storage path %r doesn't exist. Please set your SESSION_FILE_PATH setting to an existing directory in which Django can store session data.( t
_storage_patht AttributeErrort getattrR t Nonet tempfilet
gettempdirt ost patht isdirR ( t clsR ( ( sG /tmp/pip-install-XxeQeY/django/django/contrib/sessions/backends/file.pyR s
c C sb | d k r | j � } n t | � j t t � � sE t d � � n t j j | j | j
| � S( s@
Get the file associated with this session key.
s! Invalid characters in session keyN( R t _get_or_create_session_keyt sett issubsetR R R R t joinR R ( R R ( ( sG /tmp/pip-install-XxeQeY/django/django/contrib/sessions/backends/file.pyt _key_to_file, s c C sa t j | j � � j } t j rK t j j | � } | j d t j
� } n t j j | � } | S( sY
Return the modification time of the file storing the session's content.
t tzinfo( R t statR"