Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>From the documentation:</p> <blockquote> <p>Templates are cached in memory after compilation. Modifications made to the template files will have no affect until you clear the template cache. Call bottle.TEMPLATES.clear() to do so. Caching is disabled in debug mode.</p> </blockquote> <p>The method run:</p> <pre><code>bottle.run( debug = True ) </code></pre> <p>will enable debuggmode.</p> <p>The default template is SimpleTemplate in <strong>stable version 0.11.6</strong>.</p> <blockquote> <p>You can write your own adapter for your favourite template engine or use one of the predefined adapters. Currently there are four fully supported template engines:</p> </blockquote> <p><em><strong>Class,URL,Decorator,Render,function</em></strong></p> <p><strong>SimpleTemplate</strong>, SimpleTemplate, Engine, view(), template()</p> <p><strong>MakoTemplate</strong>, <a href="http://www.makotemplates.org" rel="nofollow">http://www.makotemplates.org</a>, mako_view(), mako_template()</p> <p><strong>CheetahTemplate</strong>, <a href="http://www.cheetahtemplate.org/" rel="nofollow">http://www.cheetahtemplate.org/</a>, cheetah_view(), cheetah_template()</p> <p><strong>Jinja2Template</strong>, <a href="http://jinja.pocoo.org/" rel="nofollow">http://jinja.pocoo.org/</a>, jinja2_view(), jinja2_template()</p> <p><strong>>>> Try using some other template engine, than the default. &lt;&lt;&lt;</strong></p> <blockquote> <p>To use MakoTemplate as your default template engine, just import its specialised decorator and render function:</p> </blockquote> <pre><code>from bottle import mako_view as view, mako_template as template </code></pre> <p><strong>>>> Check that you dont have duplicated files in the view paths &lt;&lt;&lt;</strong></p> <pre><code>TEMPLATE_PATH = ['./', './views/'] </code></pre> <p><strong>>>> Print out templates dictionary &lt;&lt;&lt;</strong></p> <pre><code>print bottle.TEMPLATES </code></pre>
    singulars
    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. This table or related slice is empty.
    1. This table or related slice is empty.
    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