OwlCyberSecurity - MANAGER
Edit File: conf.cpython-39.pyc
a kH�fa � @ st d Z ddlmZ ddlmZ ddlmZ ddlmZm Z m Z mZmZ d dd �Z dd d�Zeee d�Zeee d�ZdS )zFunctions for use in URLsconfs.� )�partial)� import_module)�ImproperlyConfigured� )�LocalePrefixPattern�RegexPattern�RoutePattern� URLPattern�URLResolverNc C s� d }t | t�rLz| \}}W qP tyH |r4td��tdt| � ��Y qP0 n| }t |t�rbt|�}t|d|�}t|d|�}|r�|s�td��|p�|}t |ttf�r�|D ]"}t|dd �}t |t �r�td��q�|||fS )NzMCannot override the namespace for a dynamic module that provides a namespace.z�Passing 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.Zurlpatterns�app_namez�Specifying 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�patternsZurl_patternr � r �R/home/gouroczh/virtualenv/test/3.9/lib/python3.9/site-packages/django/urls/conf.py�include s@ ��� � �r c C s� ddl m} |d ur2t|t�s2td|jj� d���t|ttf�rh|| dd�}|\}}} t ||||| d�S t |�r�|| |dd �}t||||�S t||�r�|jj} td | � d| � d���ntd ��d S )Nr )�Viewz(kwargs argument must be a dict, but got �.F)�is_endpoint)r r T)�namer zview must be a callable, pass z.as_view(), not z().zAview must be a callable or a list/tuple in the case of include().)Zdjango.viewsr r �dict� TypeError� __class__�__name__r r r �callabler )Zroute�view�kwargsr �Patternr r r r r Z view_cls_namer r r �_path= s8 � � ���r'