+
    Tj                      ~    R t ^ RIHtHtHt ^ RIHtHt  ! R R]4      t	R t
R tRR ltR tR	 tR
 tR tR tR tR# )zCFunctions that help with dynamically creating decorators for views.)partialupdate_wrapperwraps)iscoroutinefunctionmarkcoroutinefunctionc                   6   a a ] tR t^t oRV 3R lltRtVtV ;t# )classonlymethodc                @   < Ve   \        R4      h\        SV `	  W4      # )Nz=This method is available only on the class, not on instances.)AttributeErrorsuper__get__)selfinstancecls	__class__s   &&&L/var/www/idalgo/venv/lib/python3.14/site-packages/django/utils/decorators.pyr   classonlymethod.__get__	   s*     O  wx--     N)__name__
__module____qualname____firstlineno__r   __static_attributes____classdictcell____classcell__)r   __classdict__s   @@r   r   r      s     . .r   r   c                 ,    VR  4       p\        W4       R# )c                      R # r   r   )argskwargss   *,r   dummy%_update_method_wrapper.<locals>.dummy   s    r   N)r   )_wrapper	decoratorr"   s   && r   _update_method_wrapperr&      s        8#r   c                   a a \        S R4      '       d   S RRR1,          o MS .o V V3R lpS  F  p\        W#4       K  	  \        VS4       \        S4      '       d   \	        V4       V# )z~
Decorate `method` with one or more function decorators. `decorators` can be
a single decorator or an iterable of decorators.
__iter__Nc           
         < \        S4      ! \        SP                  V \        V 4      4      4      4      pS F  pV! V4      pK  	  V! V/ VB # r   )r   r   r   type)r   r    r!   bound_methoddec
decoratorsmethods   &*,  r   r$   !_multi_decorate.<locals>._wrapper(   sK    
 V}WV^^D$t*-M%NOC|,L T,V,,r   )hasattrr&   r   r   r   )r-   r.   r$   r,   s   ff  r   _multi_decorater2      sf    
 z:&&  "%
 \
- x-  8V$6""h'Or   c                   a a V V3R lp\        S R4      '       g   \        VS 4       \        S R4      '       d   S MS P                  pRVP                  ,          Vn        V# )z6
Convert a function decorator into a method decorator
c           	      D  < \        V \        4      '       g   \        SV 4      # S'       d   \        V S4      '       g   \	        R V : RS: R24      h\        V S4      p\        V4      '       g   \        RS: RV : RV: R24      h\        SV4      p\        V SV4       V # )zQThe keyword argument `name` must be the name of a method of the decorated class: z. Got 'z
' instead.zCannot decorate 'z&' as it isn't a callable attribute of z (z).)	
isinstancer*   r2   r1   
ValueErrorgetattrcallable	TypeErrorsetattr)objr.   r$   r%   names   &  r   _decmethod_decorator.<locals>._decG   s    #t$$"9c22d++CFN  d#"C1  #9f5T8$
r   r(   r   zmethod_decorator(%s))r1   r   r   r   )r%   r<   r=   r;   s   ff  r   method_decoratorr?   >   sO    ( 9j))tY'y*55)9;N;NC*S\\9DMKr   c                    \        V 4      # )a  
Like decorator_from_middleware, but return a function
that accepts the arguments to be passed to the middleware_class.
Use like::

     cache_page = decorator_from_middleware_with_args(CacheMiddleware)
     # ...

     @cache_page(3600)
     def my_view(request):
         # ...
make_middleware_decoratormiddleware_classs   &r   #decorator_from_middleware_with_argsrE   c   s     %%566r   c                "    \        V 4      ! 4       # )z
Given a middleware class (not an instance), return a view decorator. This
lets you use middleware functionality on a per-view basis. The middleware
is created with no params passed.
rA   rC   s   &r   decorator_from_middlewarerG   s   s     %%5688r   c                    a  V 3R  lpV# )c                     <a a V VV3R  lpV# )c                    <a aaaa S! S .SO5/ SB oVV 3R  loV3R loV3R lo\        S 4      '       d   VVVV 3R lpM	VVVV 3R lp\        S 4      ! V4      # )c                    < \        SR 4      '       d   SP                  V 4      pVe   V# \        SR4      '       d   SP                  V SW4      pVe   V# R# )process_requestNprocess_view)r1   rL   rM   )requestr    r!   result
middleware	view_funcs   &*, r   _pre_process_requestdmake_middleware_decorator.<locals>._make_decorator.<locals>._decorator.<locals>._pre_process_request   s[    :'899'77@F)%:~66'44WiVF)%r   c                 X   < \        SR 4      '       d   SP                  W4      pVe   V# h )process_exception)r1   rU   )rN   	exceptionrO   rP   s   && r   _process_exceptionbmake_middleware_decorator.<locals>._make_decorator.<locals>._decorator.<locals>._process_exception   s/    :':;;'99'MF)%r   c                 L  <a  \        VR 4      '       dl   \        VP                  4      '       dQ   \        SR4      '       d   SP                  S V4      p\        SR4      '       d   VV 3R lpVP	                  V4       V# \        SR4      '       d   SP                  S V4      # V# )renderprocess_template_responseprocess_responsec                 (   < SP                  SV 4      # r   )r\   )responserP   rN   s   &r   callbackwmake_middleware_decorator.<locals>._make_decorator.<locals>._decorator.<locals>._post_process_request.<locals>.callback   s    #-#>#>w#QQr   )r1   r8   rZ   r[   add_post_render_callbackr\   )rN   r^   r_   rP   s   f& r   _post_process_requestemake_middleware_decorator.<locals>._make_decorator.<locals>._decorator.<locals>._post_process_request   s    8X..8HOO3L3Lz+FGG#-#G#G#X$
 z+=>>R !99(C   z+=>>)::7HMMr   c                    <"   S! V .VO5/ VB pVe   V#  S	! V .VO5/ VB G R j  xL
 pS! V X4      #  L  \          d   pS! Y4      pTe   Tu R p?#  R p?L.R p?ii ; i5ir   	Exception
rN   r    r!   rO   r^   erb   rR   rW   rQ   s
   &*,   r   _view_wrapper]make_middleware_decorator.<locals>._make_decorator.<locals>._decorator.<locals>._view_wrapper   s     1'KDKFKF)%*)27)LT)LV)L#L 1(CC $M$ *!3G!?!-#)M .*s=   A!6 46 	A!6 AAA
A!AA!c                    < S! V .VO5/ VB pVe   V#  S	! V .VO5/ VB pS! V X4      #   \          d   pS! Y4      pTe   Tu R p?#  R p?L,R p?ii ; ir   re   rg   s
   &*,   r   ri   rj      sv    1'KDKFKF)%*#,W#Ft#Fv#F 1(CC % *!3G!?!-#)M .*s   * AAAA)r   r   )	rQ   ri   rb   rR   rW   rP   m_argsm_kwargsrD   s	   f @@@@r   
_decoratorFmake_middleware_decorator.<locals>._make_decorator.<locals>._decorator~   s]    ))IfIIJ	 & #9--D D D D #M22r   r   )rl   rm   rn   rD   s   jl r   _make_decorator2make_middleware_decorator.<locals>._make_decorator}   s    H	3T r   r   )rD   rp   s   f r   rB   rB   |   s    KZ r   c                "    RV n         RV n        V # )z^
Mark a middleware factory as returning a hybrid middleware supporting both
types of request.
Tsync_capableasync_capablefuncs   &r   sync_and_async_middlewarerx      s    
 DDKr   c                "    RV n         RV n        V # )zP
Mark a middleware factory as returning a sync middleware.
This is the default.
TFrs   rv   s   &r   sync_only_middlewarerz      s    
 DDKr   c                "    RV n         RV n        V # )z;Mark a middleware factory as returning an async middleware.FTrs   rv   s   &r   async_only_middlewarer|      s    DDKr   N) )__doc__	functoolsr   r   r   asgiref.syncr   r   classmethodr   r&   r2   r?   rE   rG   rB   rx   rz   r|   r   r   r   <module>r      sN    E 4 4 C.k .$ F"J7 9Nbr   