
    YeIi]                     D    d dl mZ d dlmZ d dlmZ  G d d          ZdS )    )compat)TemplateLookup)Templatec                   ,    e Zd ZdZd	dZd
dZ	 ddZdS )TGPluginz&TurboGears compatible Template Plugin.Nmakc                 `   || _         || _        |si }i }|                                D ]1\  }}|                    d          r|||dd          <   (|dv r|||<   2t	          di || _        i | _        t          j        t          j
                  d         D ]}||v r||         | j        |<   d S )Nzmako.   )directoriesfilesystem_checksmodule_directoryr    )extra_vars_func	extensionitems
startswithr   lookuptmpl_optionsr   inspect_getargspecr   __init__)selfr   optionsr   lookup_optionskvkws           X/var/www/html/MCyber-Diagnostic/venv/lib/python3.11/site-packages/mako/ext/turbogears.pyr   zTGPlugin.__init__   s    ." 	G MMOO 	& 	&DAq||G$$ &()qu%%NNN$%q!$66~66 +H,=>>qA 	; 	;B^##(6r(:!"%	; 	;    c                     |t          |fi | j        S d|vr$d|                    dd          z   dz   | j        z   }| j                            |          S )z(Loads a template from a file or a stringN/.)r   r   replacer   r   get_template)r   templatenametemplate_strings      r   load_templatezTGPlugin.load_template&   sm    &OAAt/@AAAl""l**3444s:T^K 
 {''555r   htmlFc                     t          |t                    r|                     |          }| j        r'|                    |                                             |j        di |S )Nr   )
isinstancestrr&   r   updaterender)r   infoformatfragmenttemplates        r   r,   zTGPlugin.render3   sl     h$$ 	4))(33H  	0KK,,..///x&&&&&r   )NNr   )N)r'   FN)__name__
__module____qualname____doc__r   r&   r,   r   r   r   r   r      s\        00; ; ; ;,6 6 6 6 =A
' 
' 
' 
' 
' 
'r   r   N)makor   mako.lookupr   mako.templater   r   r   r   r   <module>r8      so          & & & & & & " " " " " "1' 1' 1' 1' 1' 1' 1' 1' 1' 1'r   