ó
­â0_c           @   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(   iÿÿÿÿN(   t   import_module(   t   ImproperlyConfigured(   t   LocaleRegexURLResolvert   RegexURLPatternt   RegexURLResolver(   t   six(   t   RemovedInDjango20Warningt
   handler400t
   handler403t
   handler404t
   handler500t   includet   urls!   django.views.defaults.bad_requests'   django.views.defaults.permission_denieds$   django.views.defaults.page_not_founds"   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 ƒ|  \ } } } q± 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 ƒ rox/ | D]$ } t | t ƒ rDt d
 ƒ ‚ qDqDWn  | | | f S(   Ns0   Must specify a namespace if specifying app_name.st   The app_name argument to django.conf.urls.include() is deprecated. Set the app_name in the included URLconf instead.t
   stackleveli   sL   Cannot override the namespace for a dynamic module that provides a namespaces´   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.t   urlpatternst   app_namesÜ   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.s:   Using i18n_patterns in an included URLconf is not allowed.(   t
   ValueErrort   warningst   warnR   t
   isinstancet   tupleR   R   t   string_typesR    t   getattrt   listR   (   t   argt	   namespaceR   t   urlconf_modulet   patternst   url_pattern(    (    s;   /tmp/pip-unpacked-wheel-BAJOf3/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   sA   view must be a callable or a list/tuple in the case of include().(   R   R   R   R   t   callableR   t	   TypeError(   t   regext   viewt   kwargst   nameR   R   R   (    (    s;   /tmp/pip-unpacked-wheel-BAJOf3/django/conf/urls/__init__.pyR   M   s    (   R   t	   importlibR    t   django.core.exceptionsR   t   django.urlsR   R   R   t   django.utilsR   t   django.utils.deprecationR   t   __all__R   R   R	   R
   t   NoneR   R   (    (    (    s;   /tmp/pip-unpacked-wheel-BAJOf3/django/conf/urls/__init__.pyt   <module>   s   :