Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Please find below some answers to your questions:</p> <ol> <li><p>For every template you have, a python module (<code>.py</code>) that contains the code needed to render the template is created. This is just an optimized version of the template that that can be executed easily from python. When that module is executed, the <code>.pyc</code> file is also created. To check this you can do the following experiment:</p> <pre><code>from mako.template import Template Template(filename='template.mako', module_directory='.') </code></pre> <p>Assumming that <code>template.mako</code> exists, you'll see that <code>template.mako.py</code> and <code>template.mako.pyc</code> are created.</p></li> <li><p>Looking at <code>pyramid.mako_templating.MakoLookupRenderer.__call__</code> I see that the method used to render a mako template in pyramid already uses a <code>TemplateLookup</code> object, so there won't be any difference.</p></li> <li><p>I see in <code>pyramid.mako_templating.renderer_factory</code> that there is a setting called <code>mako.module_directory</code>. This, together with other similar settings, can be used to control <code>mako</code> library behaviour to create module files. I looks like the default behaviour is not to create those files (<code>mako.module_directory</code> is <code>None</code> by default), but you can certainly do whatever you need.</p></li> <li><p>In <code>TemplateLookup</code> is see a parameter called <code>cache_impl</code> that by default is set to <code>beaker</code>, so I guess there isn' any difference.</p></li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload