
    h5                     $   S SK r S SKJr  S SKJr  S SKJr  SSKJrJ	r	J
r
Jr  \" \	R                  5      S 5       rS r\" \	R                  5      S	 5       rSS
 jrS r\" \	R                  5      S 5       rS r\" \	R                  5      S 5       rg)    N)Counter)settings)ViewDoesNotExist   )ErrorTagsWarningregisterc                 b    [        [        SS 5      (       a  SSKJn  U" 5       n[	        U5      $ / $ )NROOT_URLCONFr   get_resolver)getattrr   django.urlsr   check_resolver)app_configskwargsr   resolvers       I/var/www/html/env/lib/python3.13/site-packages/django/core/checks/urls.pycheck_url_configr   
   s+    x..,>h''I    c                 l    [        U SS5      nUb  U" 5       $ [        U S5      (       d  [        U 5      $ / $ )z!
Recursively check the resolver.
checkNresolve)r   hasattrget_warning_for_invalid_pattern)r   check_methods     r   r   r      s=     8Wd3L~Xy)).x88	r   c                 F   [        [        SS5      (       d  / $ SSKJn  U" 5       n[	        U5      n[        U5      nUR                  5        VVs/ s H  u  pgUS:  d  M  UPM     nnn/ n	U H+  n
U	R                  [        SR                  U
5      SS95        M-     U	$ s  snnf )	z<
Warn if URL namespaces used in applications aren't unique.
r   Nr   r   r   zZURL namespace '{}' isn't unique. You may not be able to reverse all URLs in this namespacez	urls.W005id)
r   r   r   r   _load_all_namespacesr   itemsappendr	   format)r   r   r   r   all_namespacescounterncountnon_unique_namespaceserrors	namespaces              r   check_url_namespaces_uniquer,   !   s    
 8^T22	(~H)(3Nn%G/6}}L81%!)QLF*	--3VI->	
 + M Ms   BBc                    [        U S/ 5      nU Vs/ s H1  n[        USS5      c  M  SR                  XR                  4-   5      PM3     nnU H4  n[        USS5      nUnUb  Xv4-  nUR                  [	        XW5      5        M6     U$ s  snf )z4
Recursively load all namespaces from URL patterns.
url_patternsr+   N:)r   joinr+   extendr!   )r   parentsr.   url
namespacespatternr+   currents           r   r!   r!   ;   s     8^R8L  C3T* 	-MM++,  
  G[$7	 |#G.w@A   s
   B"Bc                     [        U [        5      (       a  SR                  U 5      nO[        U [        5      (       a  SnOSn[	        SR                  U 5      USS9/$ )z
Return a list containing a warning that the pattern is invalid.

describe_pattern() cannot be used here, because we cannot rely on the
urlpattern having regex or name attributes.
zkTry removing the string '{}'. The list of urlpatterns should not have a prefix string as the first element.z$Try using path() instead of a tuple.NziYour URL pattern {!r} is invalid. Ensure that urlpatterns is a list of path() and/or re_path() instances.z	urls.E004hintr    )
isinstancestrr$   tupler   )r5   r9   s     r   r   r   N   se     '399? 	 
GU	#	#5 	44:F7O		
 r   c                     / nS HN  n[        [        U5      nU(       d  M  UR                  S5      (       a  M4  UR                  [	        U5      5        MP     U$ )N)
STATIC_URL	MEDIA_URL/)r   r   endswithr#   E006)r   r   r*   namevalues        r   check_url_settingsrE   i   sG    F+$'5,,MM$t*% , Mr   c                 4    [        SR                  U 5      SS9$ )Nz%The {} setting must end with a slash.z	urls.E006r   )r   r$   )rC   s    r   rB   rB   s   s     /66t< r   c           
      t   [        [        SS 5      (       d  / $ SSKJn  U" 5       n/ nS HC  u  pV UR	                  U5      n[        R                  " U5      nS /U-  n UR                  " U6   ME     U$ ! [
        [        4 aV  n[        UR                  SU-  5      n	SR                  XYS9n
UR                  [        U
[        U5      SS	95         S nAM  S nAff = f! [         aQ    S
R                  UUR                   S-   UR"                  -   US:X  a  SOSS9n
UR                  [        U
SS95         GM  f = f)Nr   r   r   ))i     )i  rH   )i  rH   )i  r   z	handler%szDThe custom handler{status_code} view '{path}' could not be imported.)status_codepathz	urls.E008r8   zeThe custom handler{status_code} view '{path}' does not take the correct number of arguments ({args})..rH   zrequest, exceptionrequest)rI   rJ   argsz	urls.E007r   )r   r   r   r   resolve_error_handlerImportErrorr   urlconf_moduler$   r#   r   r;   inspect	signaturebind	TypeError
__module____qualname__)r   r   r   r   r*   rI   num_parametershandlererJ   msgrR   rM   s                r   check_custom_error_handlersr[   z   sO   8^T22	(~HF (P#		44[AG %%g.	v&	6NND! (P2 M- -. 	822K+4MNDff8  MM%#a&[AB	  		6Af'''#-0D0DD-;q-@)i    MM%455		6s+   A3C3CACCAD76D7) )rQ   collectionsr   django.confr   django.core.exceptionsr    r   r   r	   r
   urlsr   r   r,   r!   r   rE   rB   r[   r\   r   r   <module>rb      s        3 , , 
$)) 
 
$)) 2&6 
$))  
$))$ $r   