
    Evg                     :    d dl mZ d dlmZ  G d de          ZdS )    )SessionBase)signingc                       e Zd Zd Zd Zd Zd ZddZddZdd	Z	dd
Z
ddZddZd Zd Zd Zed             Zed             ZdS )SessionStorec                     	 t          j        | j        | j        |                                 d          S # t
          $ r |                                  Y nw xY wi S )z
        Load the data from the key itself instead of fetching from some
        external data store. Opposite of _get_session_key(), raise BadSignature
        if signature fails.
        /django.contrib.sessions.backends.signed_cookies)
serializermax_agesalt)r   loadssession_keyr	   get_session_cookie_age	Exceptioncreateselfs    l/var/www/pixelcanvas.ch/venv/lib/python3.11/site-packages/django/contrib/sessions/backends/signed_cookies.pyloadzSessionStore.load   st    	= ?3355F     	 	 	 KKMMMMM	 	s   36 AAc                 .   K   |                                  S N)r   r   s    r   aloadzSessionStore.aload   s      yy{{    c                     d| _         dS )z
        To create a new key, set the modified flag so that the cookie is set
        on the client for the current request.
        TN)modifiedr   s    r   r   zSessionStore.create   s    
 r   c                 .   K   |                                  S r   )r   r   s    r   acreatezSessionStore.acreate$   s      {{}}r   Fc                 F    |                                  | _        d| _        dS )z
        To save, get the session key as a securely signed string and then set
        the modified flag so that the cookie is set on the client for the
        current request.
        TN)_get_session_key_session_keyr   r   must_creates     r   savezSessionStore.save'   s#     !1133r   c                 2   K   |                      |          S )N)r!   r"   r    s     r   asavezSessionStore.asave0   s      yy[y111r   Nc                     dS )z
        This method makes sense when you're talking to a shared resource, but
        it doesn't matter when you're storing the information in the client's
        cookie.
        F r   r   s     r   existszSessionStore.exists3   s	     ur   c                 2   K   |                      |          S N)r   )r)   r(   s     r   aexistszSessionStore.aexists;         {{{{333r   c                 0    d| _         i | _        d| _        dS )z
        To delete, clear the session key and the underlying data structure
        and set the modified flag so that the cookie is set on the client for
        the current request.
         TN)r   _session_cacher   r(   s     r   deletezSessionStore.delete>   s      r   c                 2   K   |                      |          S r+   )r1   r(   s     r   adeletezSessionStore.adeleteH   r-   r   c                 .    |                                   dS )z
        Keep the same data but with a new key. Call save() and it will
        automatically save a cookie with a new key at the end of the request.
        Nr$   r   s    r   	cycle_keyzSessionStore.cycle_keyK   s    
 			r   c                 .   K   |                                  S r   )r5   r   s    r   
acycle_keyzSessionStore.acycle_keyR   s      ~~r   c                 F    t          j        | j        dd| j                  S )z
        Instead of generating a random string, generate a secure url-safe
        base64-encoded string of data as our session key.
        Tr   )compressr   r	   )r   dumps_sessionr	   r   s    r   r   zSessionStore._get_session_keyU   s-    
 }MB	
 
 
 	
r   c                     d S r   r'   clss    r   clear_expiredzSessionStore.clear_expireda   s    r   c                 
   K   d S r   r'   r=   s    r   aclear_expiredzSessionStore.aclear_expirede   s      r   )Fr   )__name__
__module____qualname__r   r   r   r   r"   r%   r)   r,   r1   r3   r5   r7   r   classmethodr?   rA   r'   r   r   r   r      s+         (         2 2 2 2   4 4 4 4   4 4 4 4       

 

 

   [   [  r   r   N)%django.contrib.sessions.backends.baser   django.corer   r   r'   r   r   <module>rH      sg    = = = = = =      b b b b b; b b b b br   