
    h                         d Z ddlmZ ddlmZ ddlmZ ddlmZm	Z	m
Z
mZmZ ddZdd	Z eee

      Z eee	
      Zy)zFunctions for use in URLsconfs.    )partial)import_module)ImproperlyConfigured   )LocalePrefixPatternRegexPatternRoutePattern
URLPatternURLResolverNc                    d }t        | t              r	 | \  }}n| }t        |t
              rt        |      }t        |d|      }t        |d|      }|r|st        d      |xs |}t        |t        t        f      r/|D ]*  }t        |dd       }t        |t              s!t        d       |||fS # t        $ r% |rt        d      t        dt	        |       z        w xY w)NzMCannot override the namespace for a dynamic module that provides a namespace.zPassing a %d-tuple to include() is not supported. Pass a 2-tuple containing the list of patterns and app_name, and provide the namespace argument to include() instead.urlpatternsapp_namezSpecifying a namespace in include() without providing an app_name is not supported. Set the app_name attribute in the included module, or pass a 2-tuple containing the list of patterns and app_name instead.patternz:Using i18n_patterns in an included URLconf is not allowed.)

isinstancetuple
ValueErrorr   lenstrr   getattrlistr   )arg	namespacer   urlconf_modulepatternsurl_patternr   s          S/var/www/html/ranktracker/api/venv/lib/python3.12/site-packages/django/urls/conf.pyincluder      s   H#u	'*$NH .#&&~6~}nEH~z8<H" 
 	
 %XI (T5M*# 	Kk9d;G'#67*P 	 Hi00I  
	*,  'GILSR 
	s   B0 0.Cc                     t        |t        t        f      r  || d      }|\  }}}t        |||||      S t	        |      r || |d      }t        ||||      S t        d      )NF)is_endpoint)r   r   T)namer   zAview must be a callable or a list/tuple in the case of include().)r   r   r   r   callabler
   	TypeError)	routeviewkwargsr    Patternr   r   r   r   s	            r   _pathr'   9   sx    $u&%U3.2+)
 	
 
$%d='466[\\    )r&   )N)NNN)__doc__	functoolsr   	importlibr   django.core.exceptionsr   	resolversr   r   r	   r
   r   r   r'   pathre_path r(   r   <module>r1      sA    %  # 7 
*1Z]& ul+
%
.r(   