î
ªÍ Xª  ã               @   sb   d  Z  d d l Z d d l m Z m Z d d l m Z d d l m Z	 Gd d „  d e	 ƒ Z d S)	z9
Wrapper for loading templates from a plain Python dict.
é    N)ÚOriginÚTemplateDoesNotExist)ÚRemovedInDjango20Warningé   )ÚLoaderc                   sI   e  Z d  Z ‡  f d d †  Z d d „  Z d d „  Z d d d	 „ Z ‡  S)
r   c                s#   | |  _  t t |  ƒ j | ƒ d  S)N)Útemplates_dictÚsuperr   Ú__init__)ÚselfZenginer   )Ú	__class__© úL/home/ubuntu/projects/ifolica/build/django/django/template/loaders/locmem.pyr	      s    	zLoader.__init__c             C   s7   y |  j  | j SWn t k
 r2 t | ƒ ‚ Yn Xd  S)N)r   ÚnameÚKeyErrorr   )r
   Úoriginr   r   r   Úget_contents   s    zLoader.get_contentsc             c   s   t  d | d | d |  ƒ Vd  S)Nr   Útemplate_nameÚloader)r   )r
   r   r   r   r   Úget_template_sources   s    zLoader.get_template_sourcesNc             C   sJ   t  j d t ƒ y |  j | | f SWn t k
 rE t | ƒ ‚ Yn Xd  S)Nz_The load_template_sources() method is deprecated. Use get_template() or get_contents() instead.)ÚwarningsÚwarnr   r   r   r   )r
   r   Ztemplate_dirsr   r   r   Úload_template_source    s    zLoader.load_template_source)Ú__name__Ú
__module__Ú__qualname__r	   r   r   r   r   r   )r   r   r      s   r   )
Ú__doc__r   Zdjango.templater   r   Zdjango.utils.deprecationr   Úbaser   Z
BaseLoaderr   r   r   r   Ú<module>   s
   