
vÅÏ^  ã               @   s-   d  d l  m Z m Z Gd d „  d ƒ Z d S)é    )ÚTemplateÚTemplateDoesNotExistc               @   sC   e  Z d  Z d d „  Z d d d „ Z d d „  Z d d	 „  Z d S)
ÚLoaderc             C   s   | |  _  d  S)N)Úengine)Úselfr   © r   ú>/tmp/pip-build-8lau8j11/django/django/template/loaders/base.pyÚ__init__   s    zLoader.__init__Nc             C   s»   g  } xœ |  j  | ƒ D]‹ } | d k	 rJ | | k rJ | j | d f ƒ q y |  j | ƒ } Wn( t k
 r‡ | j | d f ƒ w Yq Xt | | | j |  j ƒ Sq Wt | d | ƒ‚ d S)a  
        Call self.get_template_sources() and return a Template object for
        the first template matching template_name. If skip is provided, ignore
        template origins in skip. This is used to avoid recursion during
        template extending.
        NZSkippedzSource does not existÚtried)Úget_template_sourcesÚappendZget_contentsr   r   Útemplate_namer   )r   r   Úskipr
   ÚoriginÚcontentsr   r   r   Úget_template	   s    zLoader.get_templatec             C   s   t  d ƒ ‚ d S)zg
        An iterator that yields possible matching template paths for a
        template name.
        zAsubclasses of Loader must provide a get_template_sources() methodN)ÚNotImplementedError)r   r   r   r   r   r   #   s    zLoader.get_template_sourcesc             C   s   d S)z}
        Reset any state maintained by the loader instance (e.g. cached
        templates or cached loader modules).
        Nr   )r   r   r   r   Úreset,   s    zLoader.reset)Ú__name__Ú
__module__Ú__qualname__r	   r   r   r   r   r   r   r   r      s   	r   N)Zdjango.templater   r   r   r   r   r   r   Ú<module>   s   