File manager - Edit - /usr/local/CyberPanel/lib/python3.10/site-packages/django/template/backends/__pycache__/base.cpython-310.pyc
Back
o �h� � @ sF d dl mZmZ d dlmZ d dlmZ d dlmZ G dd� d�Z dS )� )�ImproperlyConfigured�SuspiciousFileOperation)�get_app_template_dirs)� safe_join)�cached_propertyc @ sD e Zd Zdd� Zedd� �Zdd� Zdd� Zed d � �Z dd� Z d S )� BaseEnginec C sL |� � }|�d�| _t|�d��| _|�d�| _|r$td�d�|����dS )zh Initialize the template engine. `params` is a dict of configuration settings. �NAME�DIRS�APP_DIRSzUnknown parameters: {}z, N) �copy�pop�name�list�dirs�app_dirsr �format�join)�self�params� r �S/usr/local/CyberPanel/lib/python3.10/site-packages/django/template/backends/base.py�__init__ s ��zBaseEngine.__init__c C s t d�| jj���)NzA{} doesn't support loading templates from installed applications.)r r � __class__�__name__)r r r r �app_dirname s �zBaseEngine.app_dirnamec C � t d��)zk Create and return a template for the given source code. This method is optional. z>subclasses of BaseEngine should provide a from_string() method��NotImplementedError)r � template_coder r r �from_string! � �zBaseEngine.from_stringc C r )z� Load and return a template for the given name. Raise TemplateDoesNotExist if no such template exists. z=subclasses of BaseEngine must provide a get_template() methodr )r � template_namer r r �get_template+ r zBaseEngine.get_templatec C s"