
    Evg                     >    d dl mZ d dlmZ ddZddZd	dZddZdS )
   )engines)TemplateDoesNotExistNc                     g }t          |          }|D ]E}	 |                    |           c S # t          $ r}|                    |           Y d}~>d}~ww xY wt          | |          )zt
    Load and return a template for the given name.

    Raise TemplateDoesNotExist if no such template exists.
    Nchain)_engine_listget_templater   append)template_nameusingr   r   enginees         S/var/www/pixelcanvas.ch/venv/lib/python3.11/site-packages/django/template/loader.pyr	   r	      s     E5!!G  	&&}55555# 	 	 	LLOOOOOOOO	 }E
:
:
::s   .
AAAc                 z   t          | t                    rt          d| z            g }t          |          }| D ]L}|D ]G}	 |                    |          c c S # t
          $ r}|                    |           Y d}~@d}~ww xY wM| r$t          d                    |           |          t          d          )z
    Load and return a template for one of the given names.

    Try names in order and return the first template found.

    Raise TemplateDoesNotExist if no such template exists.
    zselect_template() takes an iterable of template names but got a string: %r. Use get_template() if you want to load a single template by name.Nz, r   zNo template names provided)
isinstancestr	TypeErrorr   r	   r   r
   join)template_name_listr   r   r   r   r   r   s          r   select_templater      s    $c** 
 "45
 
 	
 E5!!G+     	  	 F **=9999999'      Q 	   A"499-?#@#@NNNN"#?@@@s   A
B%A??Bc                     t          | t          t          f          rt          | |          }nt	          | |          }|                    ||          S )z
    Load a template and render it with a context. Return a string.

    template_name may be a string or a list of strings.
    r   )r   listtupler   r	   render)r   contextrequestr   templates        r   render_to_stringr   4   sT     -$// <"=>>>U;;;??7G,,,    c                 H    | t          j                    nt           |          gS N)r   allr   s    r   r   r   A   s    !M7;===/??r    r"   )NNN) r   
exceptionsr   r	   r   r   r    r    r   <module>r'      s          , , , , , ,; ; ; ;"A A A A<
- 
- 
- 
-@ @ @ @ @ @r    