î
ªÍ XÚ  ã               @   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 d „ Z d 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 ƒ ‚ n  | r; t j d t d d ƒn  t |  t ƒ r¬ y |  \ } } Wq² t  k
 r¨ | r t d ƒ ‚ n  t j d t d d ƒ|  \ } } } Yq² Xn |  } t | t j ƒ rÓ t	 | ƒ } n  t
 | d | ƒ } t
 | d | ƒ } | r| rt j d	 t d d ƒn  | p&| } t | t t f ƒ rpx/ | D]$ } t | t ƒ rEt d
 ƒ ‚ qEqEWn  | | | 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.Ú
stacklevelé   zLCannot override the namespace for a dynamic module that provides a namespacez´Passing 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_namezÜSpecifying 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   úG/home/ubuntu/projects/ifolica/build/django/django/conf/urls/__init__.pyr      sB    c             C   so   t  | t t f ƒ r@ | \ } } } t |  | | d | d | ƒSt | ƒ r_ t |  | | | ƒ St d ƒ ‚ d  S)Nr   r   zAview must be a callable or a list/tuple in the case of include().)r   r   r   r   Úcallabler   Ú	TypeError)ÚregexZviewÚkwargsÚnamer   r   r   r   r   r   r   M   s    )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   :