ó
®â0_c           @   sb   d  d l  Z  d  d l m Z m Z m Z d  d l m Z d  d l m Z d e	 f d „  ƒ  YZ
 d S(   iÿÿÿÿN(   t   Origint   Templatet   TemplateDoesNotExist(   t   RemovedInDjango20Warning(   t   func_supports_parametert   Loaderc           B   se   e  Z d  „  Z d d „ Z d d d „ Z d d „ Z d „  Z d d „ Z d „  Z	 e
 d „  ƒ Z RS(	   c         C   s   | |  _  d  S(   N(   t   engine(   t   selfR   (    (    s>   /tmp/pip-unpacked-wheel-BAJOf3/django/template/loaders/base.pyt   __init__
   s    c         C   s   |  j  | | ƒ S(   N(   t   load_template(   R   t   template_namet   template_dirs(    (    s>   /tmp/pip-unpacked-wheel-BAJOf3/django/template/loaders/base.pyt   __call__   s    c         C   sè   g  } | g } t  |  j d ƒ r1 | j | ƒ n  xž |  j | Œ  D] } | d k	 rx | | k rx | j | d f ƒ qA n  y |  j | ƒ } Wn' t k
 r´ | j | d f ƒ qA qA Xt | | | j |  j ƒ SqA Wt | d | ƒ‚ d S(   s  
        Calls self.get_template_sources() and returns a Template object for
        the first template matching template_name. If skip is provided,
        template origins in skip are ignored. This is used to avoid recursion
        during template extending.
        R   t   Skippeds   Source does not existt   triedN(	   R   t   get_template_sourcest   appendt   Nonet   get_contentsR   R   R
   R   (   R   R
   R   t   skipR   t   argst   origint   contents(    (    s>   /tmp/pip-unpacked-wheel-BAJOf3/django/template/loaders/base.pyt   get_template   s     	c         C   sˆ   t  j d t ƒ |  j | | ƒ \ } } t d | d | d |  ƒ } y t | | | |  j ƒ } Wn t k
 ry | | f SX| d  f Sd  S(   NsE   The load_template() method is deprecated. Use get_template() instead.t   nameR
   t   loader(	   t   warningst   warnR   t   load_template_sourceR    R   R   R   R   (   R   R
   R   t   sourcet   display_nameR   t   template(    (    s>   /tmp/pip-unpacked-wheel-BAJOf3/django/template/loaders/base.pyR	   1   s    	c         C   s   t  d ƒ ‚ d S(   sg   
        An iterator that yields possible matching template paths for a
        template name.
        sA   subclasses of Loader must provide a get_template_sources() methodN(   t   NotImplementedError(   R   R
   (    (    s>   /tmp/pip-unpacked-wheel-BAJOf3/django/template/loaders/base.pyR   I   s    c         C   s   t  d ƒ ‚ d S(   s   
        RemovedInDjango20Warning: Returns a tuple containing the source and
        origin for the given template name.
        sA   subclasses of Loader must provide a load_template_source() methodN(   R    (   R   R
   R   (    (    s>   /tmp/pip-unpacked-wheel-BAJOf3/django/template/loaders/base.pyR   R   s    c         C   s   d S(   s~   
        Resets any state maintained by the loader instance (e.g. cached
        templates or cached loader modules).
        N(    (   R   (    (    s>   /tmp/pip-unpacked-wheel-BAJOf3/django/template/loaders/base.pyt   reset[   s    c         C   s   t  |  d ƒ S(   s™   
        RemovedInDjango20Warning: This is an internal property used by the
        ExtendsNode during the deprecation of non-recursive loaders.
        R   (   t   hasattr(   R   (    (    s>   /tmp/pip-unpacked-wheel-BAJOf3/django/template/loaders/base.pyt   supports_recursionb   s    N(   t   __name__t
   __module__R   R   R   R   R	   R   R   R!   t   propertyR#   (    (    (    s>   /tmp/pip-unpacked-wheel-BAJOf3/django/template/loaders/base.pyR      s   	 				(   R   t   django.templateR    R   R   t   django.utils.deprecationR   t   django.utils.inspectR   t   objectR   (    (    (    s>   /tmp/pip-unpacked-wheel-BAJOf3/django/template/loaders/base.pyt   <module>   s   