← Back
Editing: base.cpython-311.pyc
� �|�e) � �0 � d dl mZmZ G d� d� � ZdS )� )�Template�TemplateDoesNotExistc �( � e Zd Zd� Zdd�Zd� Zd� ZdS )�Loaderc � � || _ d S �N)�engine)�selfr s �>/usr/lib/python3/dist-packages/django/template/loaders/base.py�__init__zLoader.__init__ s � ������ Nc �H � g }| � |� � D ]z}|�||v r|� |df� � � | � |� � }t |||j | j � � c S # t $ r |� |df� � Y �ww xY wt ||�� � �)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. NzSkipped to avoid recursionzSource does not exist)�tried)�get_template_sources�append�get_contentsr � template_namer r )r r �skipr �origin�contentss r �get_templatezLoader.get_template s� � � ���/�/� �>�>� � �F���F�d�N�N����f�&B�C�D�D�D�� ��,�,�V�4�4�� ��f�f�&:�D�K�� � � � �� (� � � ����f�&=�>�?�?�?��� ���� #�=��>�>�>�>s �A,�,!B�Bc � � t d� � �)zg An iterator that yields possible matching template paths for a template name. zAsubclasses of Loader must provide a get_template_sources() method)�NotImplementedError)r r s r r zLoader.get_template_sources# s � � "�O� � � r c � � dS )z} Reset any state maintained by the loader instance (e.g. cached templates or cached loader modules). N� )r s r �resetzLoader.reset, s � � �r r )�__name__� __module__�__qualname__r r r r r r r r r sU � � � � � �� � �?� ?� ?� ?�4 � � � � � � � r r N)�django.templater r r r r r �<module>r! sO �� :� :� :� :� :� :� :� :�- � - � - � - � - � - � - � - � - � - r
Save File
Cancel