
    g]                     <    S SK Jr  S SKJr  S SKJr   " S S5      rg)    )compat)TemplateLookup)Templatec                   8    \ rS rSrSrSS jrS	S jr S
S jrSrg)TGPlugin   z&TurboGears compatible Template Plugin.Nc                 t   Xl         X0l        U(       d  0 n0 nUR                  5        H0  u  pVUR                  S5      (       a	  XdUSS  '   M$  US;   d  M,  XdU'   M2     [	        S0 UD6U l        0 U l        [        R                  " [        R                  5      S    H  nXt;   d  M
  XG   U R                  U'   M     g )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           [/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/mako/ext/turbogears.pyr   TGPlugin.__init__   s    ."G MMODA||G$$()qu%NN$%q!	 $
 %6~6 ++H,=,=>qAB#(6(:!!"% B    c                     Ub  [        U40 U R                  D6$ SU;  a%  SUR                  SS5      -   S-   U R                  -   nU R                  R                  U5      $ )z(Loads a template from a file or a string/.)r   r   replacer   r   get_template)r   templatenametemplate_strings      r   load_templateTGPlugin.load_template&   se    &OAt/@/@AAl"l**344s:T^^K 
 {{''55r   c                     [        U[        5      (       a  U R                  U5      nU R                  (       a  UR	                  U R                  5       5        UR
                  " S0 UD6$ )Nr   )
isinstancestrr'   r   updaterender)r   infoformatfragmenttemplates        r   r-   TGPlugin.render3   sS     h$$))(3H KK,,./&&&r   )r   r   r   r   )NNmak)N)htmlFN)	__name__
__module____qualname____firstlineno____doc__r   r'   r-   __static_attributes__r   r   r   r   r      s    0;,6 =A
'r   r   N)makor   mako.lookupr   mako.templater   r   r   r   r   <module>r>      s     & "1' 1'r   