+
    Tj9                         ^ RI t ^ RIt^ RIt^ RIHtHtHt ^ RIHt ^ RI	H
t
Ht ^ RIHt ^ RIHtHt ^ RIHtHt ^ RIHt ^ R	IHt ^R
IHt ]P4                  ! R4      t ! R R4      tR t]P<                  ! ]4       R# )    N)async_to_synciscoroutinefunctionsync_to_async)settings)ImproperlyConfiguredMiddlewareNotUsed)request_finished)connectionstransaction)get_resolverset_urlconf)log_response)import_string)convert_exception_to_responsezdjango.requestc                   x   a  ] tR t^t o RtRtRtRtRR ltRR lt	R t
R tR tR tR tRR	 ltR
 tR tRtV tR# )BaseHandlerNc           	        . V n         . V n        . V n        V'       d   V P                  MV P                  p\        V4      pTp\        \        P                  4       EF  p\        V4      p\        VRR4      p\        VRR4      pV'       g   V'       g   \        RV,          4      hV'       g   V'       d   Rp	MTp	 V P                  V	VV\        P                  RV,          R7      p
V! V
4      pT
pTf   \%        RT,          4      h\'        TR4      '       d6   T P                   P)                  ^ T P                  YP*                  4      4       \'        TR4      '       d5   T P                  P-                  T P                  YP.                  4      4       \'        TR4      '       d6   T P                  P-                  T P                  RTP0                  4      4       \        T4      pT	pEK  	  V P                  WV4      pW0n        R
#   \         da   p\        P                  '       d?   \        T4      '       d   \         P#                  RY\4       M\         P#                  R	T4        R
p?EK  R
p?ii ; i)z
Populate middleware lists from settings.MIDDLEWARE.

Must be called after the environment is fixed (see __call__ in
subclasses).
sync_capableTasync_capableFzOMiddleware %s must have at least one of sync_capable/async_capable set to True.zmiddleware %s)debugnamezMiddlewareNotUsed(%r): %szMiddlewareNotUsed: %rNz$Middleware factory %s returned None.process_viewprocess_template_responseprocess_exception)_view_middleware_template_response_middleware_exception_middleware_get_response_async_get_responser   reversedr   
MIDDLEWAREr   getattrRuntimeErroradapt_method_modeDEBUGr   strloggerr   r   hasattrinsertr   appendr   r   _middleware_chain)selfis_asyncget_responsehandlerhandler_is_asyncmiddleware_path
middlewaremiddleware_can_syncmiddleware_can_asyncmiddleware_is_asyncadapted_handlermw_instanceexcs   &&           N/var/www/idalgo/venv/lib/python3.14/site-packages/django/core/handlers/base.pyload_middlewareBaseHandler.load_middleware   s;    !#-/*%'"3;t//ASAS/=#'(;(;<O&7J")*nd"K#*:#N &/C">@OP  &*=&+#&:#*"&"8"8'$"..(?: #9 # )9 *"*:_L  {N33%%,,**85M5MN {$?@@2299** "G"G
 {$788 **11**5+2O2OP 4K@G2s  =x ((<LM ")Q % >>>3xx%@/W%<oNs   =3HI3AI..I3c                \   Vf   \        V4      pV'       d&   V'       g   T;'       g    RVP                  ,          pV'       d7   V'       g,   V'       d   \        P                  RV4       \	        VRR7      #  V# V'       d*   V'       d   \        P                  RV4       \        V4      # V# )a  
Adapt a method to be in the correct "mode":
- If is_async is False:
  - Synchronous methods are left alone
  - Asynchronous methods are wrapped with async_to_sync
- If is_async is True:
  - Synchronous methods are wrapped with sync_to_async()
  - Asynchronous methods are left alone
zmethod %s()z#Synchronous handler adapted for %s.Tthread_sensitivez$Asynchronous handler adapted for %s.)r   __qualname__r'   r   r   r   )r,   r-   methodmethod_is_asyncr   r   s   &&&&&&r9   r$   BaseHandler.adapt_method_modei   s    " "1&9O>>=6+>+>>D"LL!FM$VdCC # 	 CTJ ((    c                   \        \        P                  4       V P                  V4      pVP                  P                  VP                  4       VP                  R8  d%   \        RVP                  VP                  VVR7       V# )z8Return an HttpResponse object for the given HttpRequest.  %s: %sresponserequest)r   r   ROOT_URLCONFr+   _resource_closersr*   closestatus_coder   reason_phrasepathr,   rI   rH   s   && r9   r.   BaseHandler.get_response   sp     	H))*))'2""))'--83&&&! rC   c                V  "   \        \        P                  4       V P                  V4      G Rj  xL
 pVP                  P                  VP                  4       VP                  R8  d9   \        \        RR7      ! RVP                  VP                  VVR7      G Rj  xL
  V#  Lt L5i)z
Asynchronous version of get_response.

Funneling everything, including WSGI, into a single async
get_response() is too slow. Avoid the context switch by using
a separate async response path.
NrE   Fr=   rF   rG   )r   r   rJ   r+   rK   r*   rL   rM   r   r   rN   rO   rP   s   && r9   get_response_asyncBaseHandler.get_response_async   s      	H))*//88""))'--83&uE&&!    9s"   .B)B%A-B)B'B)'B)c                   RpV P                  V4      w  r4pV P                   F  pV! WWE4      pV'       g   K   M	  Vf;   V P                  V4      p\        V4      '       d   \	        V4      p V! V.VO5/ VB pV P                  W#4       \        VR4      '       d   \        VP                  4      '       de   V P                   FA  pV! W4      pV P                  VVVP                  P                  P                  : R2R7       KC  	   VP                  4       pV# V#   \
         d!   pT P                  Y4      pTf   h  Rp?LRp?ii ; i  \
         d"   pT P                  Y4      pTf   h  Rp?T# Rp?ii ; i)
Resolve and call the view, then apply view, exception, and
template_response middleware. This method is everything that happens
inside the request/response middleware.
Nrender.process_template_responser   )resolve_requestr   make_view_atomicr   r   	Exceptionprocess_exception_by_middlewarecheck_responser(   callablerW   r   __self__	__class____name__	r,   rI   rH   callbackcallback_argscallback_kwargsmiddleware_methodwrapped_callbackes	   &&       r9   r   BaseHandler._get_response   s    373G3G3P0 "&!6!6(=H x "7 #44X>"#344#01A#B +GWmWW 	H/ 8X&&8HOO+D+D%)%G%G!,W? ##%(11;;DDG $ 	 &H#??, x9  ??K# $.  ??K# $ s0   /D E E
*EE
E9E44E9c                ~  "   RpV P                  V4      w  r4pV P                   F  pV! WWE4      G Rj  xL
 pV'       g   K   M	  VfE   V P                  V4      p\        V4      '       g   \	        VRR7      p V! V.VO5/ VB G Rj  xL
 pV P                  W#4       \        VR4      '       d   \        VP                  4      '       d   V P                   FI  pV! W4      G Rj  xL
 pV P                  VVVP                  P                  P                  : R2R7       KK  	   \        VP                  4      '       d   VP                  4       G Rj  xL
 pM%\	        VP                  RR7      ! 4       G Rj  xL
 p \        P                   ! V4      '       d   \#        R4      hV#  ELu EL"  \
         d7   p\	        T P                  RR7      ! Y4      G Rj  xL 
 pTf   h  Rp?EL\Rp?ii ; i EL L L}  \
         d6   p\	        T P                  RR7      ! Y4      G Rj  xL 
 pTf   h  Rp?LRp?ii ; i5i)rV   NTr=   rW   rX   rY   zResponse is still a coroutine.)rZ   r   r[   r   r   r\   r]   r^   r(   r_   rW   r   r`   ra   rb   asyncioiscoroutiner#   rc   s	   &&       r9   r   BaseHandler._get_response_async   sF     373G3G3P0 "&!6!6.= H x "7 #44X>&'788#0$t$ 
!1"+"/>"  	H/ 8X&&8HOO+D+D%)%G%G!!27!EE ##%(11;;DDG $ 	 &H&x77%-__%66H%2 $& &  H x((?@@w  !.88%)" "   # $ F  7   !.88%)" "   # $s   2H=F)	H=7H=;F/ 
F,F/ AH='G3(>H='.G: G6G: H=G: :G8;G: ?H=H=,F/ /G0: G+G
G+%H=+G00H=6G: 8G: :H: H5%H(&
H50H=5H::H=c                    \        VR4      '       d$   VP                  p\        V4       \        V4      pM
\        4       pVP	                  VP
                  4      pWAn        V# )z_
Retrieve/set the urlconf for the request. Return the view resolved,
with its args and kwargs.
urlconf)r(   rp   r   r   resolve	path_inforesolver_match)r,   rI   rp   resolverrs   s   &&   r9   rZ   BaseHandler.resolve_request-  sU     7I&&ooG #G,H#~H!))'*;*;<!/rC   c                   Ve   \         P                  ! V4      '       g   R# V'       gi   \        V\        P                  4      '       d    RVP
                  : RVP                  : 2pM)RVP
                  : RVP                  P                  : R2pVf   \        RV,          4      h\         P                  ! V4      '       d   \        RV,          4      hR# )zD
Raise an error if the view returned None or an uncalled coroutine.
Nz	The view .z	.__call__zB%s didn't return an HttpResponse object. It returned None instead.z%s didn't return an HttpResponse object. It returned an unawaited coroutine instead. You may need to add an 'await' into your view.)	rl   rm   
isinstancetypesFunctionType
__module__rb   ra   
ValueError)r,   rH   rd   r   s   &&&&r9   r^   BaseHandler.check_response>  s      G$7$7$A$A(E$6$677+3+>+>@Q@QR 8 ''&&// !"    **"$()  +rC   c                "   \        VR \        4       4      p\        P                  P	                  4        FW  w  r4VR,          '       g   K  W29  g   K  \        V4      '       d   \        R4      h\        P                  ! VR7      ! V4      pKY  	  V# )_non_atomic_requestsATOMIC_REQUESTSz0You cannot use ATOMIC_REQUESTS with async views.)using)	r"   setr
   r   itemsr   r#   r   atomic)r,   viewnon_atomic_requestsaliassettings_dicts   &&   r9   r[   BaseHandler.make_view_atomicZ  s{    %d,BCEJ$/$8$8$>$>$@ E.//E4T&t,,&J  #))6t< %A rC   c                T    V P                    F  pV! W!4      pV'       g   K  Vu # 	  R# )zu
Pass the exception to the exception middleware. If no middleware
return a response for this exception, return None.
N)r   )r,   	exceptionrI   rg   rH   s   &&&  r9   r]   +BaseHandler.process_exception_by_middlewaree  s.    
 "&!;!;(<Hx "< rC   )r   r+   r   r   )F)NFN)N)rb   r{   r?   __firstlineno__r   r   r   r+   r:   r$   r.   rS   r   r   rZ   r^   r[   r]   __static_attributes____classdictcell__)__classdict__s   @r9   r   r      sZ     $(! M)^@ ,4lFP"8		 	rC   r   c                    \        R4       R# )z1Reset the URLconf after each request is finished.N)r   )senderkwargss   &,r9   reset_urlconfr   q  s
    rC   )rl   loggingry   asgiref.syncr   r   r   django.confr   django.core.exceptionsr   r   django.core.signalsr	   	django.dbr
   r   django.urlsr   r   django.utils.logr   django.utils.module_loadingr   r   r   	getLoggerr'   r   r   connect rC   r9   <module>r      s_       J J   J 0 . 1 ) 5 4			+	,Z Zz

    'rC   