<divstyle="padding: 0 0 20px 0; margin: 0 0 20px 0; background-color: #22B24C;">
<divclass="container">
<pclass="banner"><ahref="https://www.kickstarter.com/projects/mikeckennedy/python-for-entrepreneurs-video-course" style="color: #fff">Use Python to build your side business with the Python for Entrepreneurs video course!</a></p>
</div>
</div><ahref="https://github.com/makaimc/fullstackpython.com"><imgstyle="position: absolute; top: 0; right: 0; border: 0;" src="/img/fork.png" alt="Fork me on GitHub"></a>
<spanclass="nt"><meta</span><spanclass="na">name=</span><spanclass="s">"description"</span><spanclass="na">content=</span><spanclass="s">"Template engines provide programmatic output of formatted content such as HTML, XML or PDF."</span><spanclass="nt">></span>
<p>Every one of the HTML lines above is standard for each page on Full Stack Python,
with the exception of the <code><meta name="description"...</code> line which provides
a unique short description of what the individual page contains.</p>
<p>The <ahref="https://github.com/makaimc/fullstackpython.com/blob/gh-pages/source/theme/templates/base.html">base.html Jinja template</a> used to generate Full Stack Python
allows every page on the site to have consistent HTML but
dynamically generate the pieces that need to change between pages when
the <ahref="/static-site-generator.html">static site generator</a> executes. The below
code from the <code>base.html</code> template shows that the meta description is up to child
<p>In a typical <ahref="/wsgi-servers.html">WSGI application</a>, the template engine would
generate the HTML output response when an HTTP request comes in for a
particular URL. </p>
<h2>Python template engines</h2>
<p>There are several popular Python template engines. A template engine implementation
will fall somewhere on the spectrum between allowing arbitrary code execution and
granting only a limited set of capabilities via template tags. A rough visual of
the code in template spectrum can be seen below for four of the major Python
template engines.</p>
<p><imgsrc="/img/template-logic-spectrum.png" width="100%" alt="Spectrum between no logic in templates and the ability to run arbitrary code." class="technical-diagram" style="border-radius: 5px;"></p>
<h3>Jinja</h3>
<p><ahref="http://jinja.pocoo.org/">Jinja</a>, also known as "Jinja2", is a popular Python
template engine written as an independent open source project, unlike some
template engines that are provided as part of a larger web framework.</p>
<p>Major Python open source applications such as the
<ahref="http://www.deploypython.com/"><imgsrc="/img/sponsored/fsp-deployment-guide.png" alt="The Full Stack Python Guide to Deployments" width="100%"></a>
<pstyle="font-size: .8em; margin-top: 10px;">Searching for a complete, step-by-step deployment walkthrough? Learn more about <ahref="http://www.deploypython.com/">The Full Stack Python Guide to Deployments book</a>.