3
(h                 @   s   d dl Z d dlmZ d dlmZ d dlmZmZmZ d dl	m
Z
 d dlmZ ddd	d
ddgZdZdZdZdZdddZdddZdS )    N)import_module)ImproperlyConfigured)LocaleRegexURLResolverRegexURLPatternRegexURLResolver)six)RemovedInDjango20Warning
handler400
handler403
handler404
handler500includeurlz!django.views.defaults.bad_requestz'django.views.defaults.permission_deniedz$django.views.defaults.page_not_foundz"django.views.defaults.server_errorc             C   s  |r| rt d|r&tjdtdd t| trzy| \}}W q~ t k
rv   |rXtdtjdtdd | \}}}Y q~X n| }t|tjrt	|}t
|d|}t
|d|}|r| rtjd	tdd |p|}t|ttfrx|D ]}t|trtd
qW |||fS )Nz0Must specify a namespace if specifying app_name.ztThe app_name argument to django.conf.urls.include() is deprecated. Set the app_name in the included URLconf instead.   )
stacklevelzLCannot override the namespace for a dynamic module that provides a namespacezPassing a 3-tuple to django.conf.urls.include() is deprecated. Pass a 2-tuple containing the list of patterns and app_name, and provide the namespace argument to include() instead.Zurlpatternsapp_namezSpecifying a namespace in django.conf.urls.include() without providing an app_name is deprecated. Set the app_name attribute in the included module, or pass a 2-tuple containing the list of patterns and app_name instead.z:Using i18n_patterns in an included URLconf is not allowed.)
ValueErrorwarningswarnr   
isinstancetupler   r   string_typesr   getattrlistr   )arg	namespacer   urlconf_modulepatternsZurl_pattern r   =/tmp/pip-install-q3hcpn_q/Django/django/conf/urls/__init__.pyr      sB    








c             C   sL   t |ttfr*|\}}}t| ||||dS t|r@t| |||S tdd S )N)r   r   zAview must be a callable or a list/tuple in the case of include().)r   r   r   r   callabler   	TypeError)regexviewkwargsnamer   r   r   r   r   r   r   M   s    
)NN)NN)r   	importlibr   Zdjango.core.exceptionsr   Zdjango.urlsr   r   r   Zdjango.utilsr   Zdjango.utils.deprecationr   __all__r	   r
   r   r   r   r   r   r   r   r   <module>   s   
: