
    k"gw                     2     G d  d      Z  G d d      Zd Zy)c                   *    e Zd Zd Zd Zd Zd Zd Zy)PermLookupDictc                 "    ||c| _         | _        y N)user	app_label)selfr   r   s      _/var/www/html/djangosite/lib/python3.12/site-packages/django/contrib/auth/context_processors.py__init__zPermLookupDict.__init__   s    $()!	4>    c                 H    t        | j                  j                               S r   )strr   get_all_permissionsr   s    r	   __repr__zPermLookupDict.__repr__	   s    49900233r   c                 V    | j                   j                  | j                  d|      S )N.)r   has_permr   )r   	perm_names     r	   __getitem__zPermLookupDict.__getitem__   s     yy!!T^^Y"GHHr   c                     t        d      )NzPermLookupDict is not iterable.	TypeErrorr   s    r	   __iter__zPermLookupDict.__iter__   s     9::r   c                 L    | j                   j                  | j                        S r   )r   has_module_permsr   r   s    r	   __bool__zPermLookupDict.__bool__   s    yy))$..99r   N)__name__
__module____qualname__r
   r   r   r   r    r   r	   r   r      s    44I;
:r   r   c                   *    e Zd Zd Zd Zd Zd Zd Zy)PermWrapperc                     || _         y r   )r   )r   r   s     r	   r
   zPermWrapper.__init__   s	    	r   c                 N    | j                   j                   d| j                  dS )N())	__class__r   r   r   s    r	   r   zPermWrapper.__repr__   s$    ..--.a		}A>>r   c                 .    t        | j                  |      S r   )r   r   )r   r   s     r	   r   zPermWrapper.__getitem__   s    dii33r   c                     t        d      )NzPermWrapper is not iterable.r   r   s    r	   r   zPermWrapper.__iter__"   s    677r   c                 `    d|vrt        | |         S |j                  dd      \  }}| |   |   S )zE
        Lookup by "someapp" or "someapp.someperm" in perms.
        r      )boolsplit)r   r   r   s      r	   __contains__zPermWrapper.__contains__&   s?     iY(((sA6	9Iy))r   N)r   r   r   r
   r   r   r   r.   r    r   r	   r"   r"      s    ?48*r   r"   c                 j    t        | d      r| j                  }nddlm}  |       }|t	        |      dS )z
    Return context variables required by apps that use Django's authentication
    system.

    If there is no 'user' attribute in the request, use AnonymousUser (from
    django.contrib.auth).
    r       )AnonymousUser)r   perms)hasattrr   django.contrib.auth.modelsr1   r"   )requestr   r1   s      r	   authr6   1   s8     w||< T" r   N)r   r"   r6   r    r   r	   <module>r7      s   
: :&* *2r   