HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/mako/ext/__pycache__/turbogears.cpython-37.opt-1.pyc
B

�C]u�@s8ddlmZddlmZddlmZGdd�de�ZdS)�)�compat)�TemplateLookup)�Templatec@s.eZdZdZddd�Zd
dd�Zdd
d�ZdS)�TGPluginz&TurboGears compatible Template Plugin.N�makcCs�||_||_|si}i}x@|��D]4\}}|�d�rF|||dd�<q"|dkr"|||<q"Wtf|�|_i|_x.t�t	j
�dD]}||kr~|||j|<q~WdS)Nzmako.�)ZdirectoriesZfilesystem_checksZmodule_directoryr)�extra_vars_func�	extension�items�
startswithr�lookup�tmpl_optionsrZinspect_getargspecr�__init__)�selfrZoptionsr	Zlookup_options�k�v�kw�r�D/opt/alt/python37/lib/python3.7/site-packages/mako/ext/turbogears.pyrs
zTGPlugin.__init__cCsD|dk	rt|f|j�Sd|kr8d|�dd�d|j}|j�|�S)z(Loads a template from a file or a stringN�/�.)rr
�replacer	rZget_template)rZtemplatenameZtemplate_stringrrr�
load_template&s
zTGPlugin.load_template�htmlFcCs6t|tj�r|�|�}|jr*|�|���|jf|�S)N)�
isinstancerZstring_typesrr�update�render)r�info�formatZfragment�templaterrrr3s

zTGPlugin.render)NNr)N)rFN)�__name__�
__module__�__qualname__�__doc__rrrrrrrrs

rN)ZmakorZmako.lookuprZ
mako.templater�objectrrrrr�<module>s