<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Python Template Engine Comparison</title>
	<link>http://lucumr.pocoo.org/cogitations/2008/01/01/python-template-engine-comparison/</link>
	<description>Armin Ronacher thinking</description>
	<pubDate>Sun, 12 Oct 2008 06:39:06 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2</generator>

	<item>
		<title>By: Tony Landis</title>
		<link>http://lucumr.pocoo.org/cogitations/2008/01/01/python-template-engine-comparison/#comment-3304</link>
		<author>Tony Landis</author>
		<pubDate>Fri, 04 Apr 2008 22:00:55 +0000</pubDate>
		<guid>http://lucumr.pocoo.org/cogitations/2008/01/01/python-template-engine-comparison/#comment-3304</guid>
		<description>Thank you, I found this information helpful</description>
		<content:encoded><![CDATA[<p>Thank you, I found this information helpful</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mario Ruggier</title>
		<link>http://lucumr.pocoo.org/cogitations/2008/01/01/python-template-engine-comparison/#comment-2789</link>
		<author>Mario Ruggier</author>
		<pubDate>Thu, 13 Mar 2008 17:19:12 +0000</pubDate>
		<guid>http://lucumr.pocoo.org/cogitations/2008/01/01/python-template-engine-comparison/#comment-2789</guid>
		<description>Thanks. The changes necessary to make it a WZ + Evoque WSGI application are really trivial. I have documented them at: http://evoque.gizmojo.org/ext/werkzeug/</description>
		<content:encoded><![CDATA[<p>Thanks. The changes necessary to make it a WZ + Evoque WSGI application are really trivial. I have documented them at: <a href="http://evoque.gizmojo.org/ext/werkzeug/" rel="nofollow">http://evoque.gizmojo.org/ext/werkzeug/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Armin Ronacher</title>
		<link>http://lucumr.pocoo.org/cogitations/2008/01/01/python-template-engine-comparison/#comment-2711</link>
		<author>Armin Ronacher</author>
		<pubDate>Mon, 10 Mar 2008 00:44:32 +0000</pubDate>
		<guid>http://lucumr.pocoo.org/cogitations/2008/01/01/python-template-engine-comparison/#comment-2711</guid>
		<description>The code for the simple WZ + Mako WSGI app is available directly on the frontpage of the current werkzeug webpage: http://werkzeug.pocoo.org/

(Click on the nutshell)</description>
		<content:encoded><![CDATA[<p>The code for the simple WZ + Mako WSGI app is available directly on the frontpage of the current werkzeug webpage: <a href="http://werkzeug.pocoo.org/" rel="nofollow">http://werkzeug.pocoo.org/</a></p>
<p>(Click on the nutshell)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mario Ruggier</title>
		<link>http://lucumr.pocoo.org/cogitations/2008/01/01/python-template-engine-comparison/#comment-2682</link>
		<author>Mario Ruggier</author>
		<pubDate>Sat, 08 Mar 2008 09:26:46 +0000</pubDate>
		<guid>http://lucumr.pocoo.org/cogitations/2008/01/01/python-template-engine-comparison/#comment-2682</guid>
		<description>"I think as long as you can limit the syntax to expressions there are ways to restrict Python enough to allow the execution of untrusted code." This is exactly what I do in Evoque (http://evoque.gizmojo.org) ... only expressions, by design. And the evaluation context may only be "extended" from the application side, not (explictly) from within a template. (There are of course implicit context modifications from within templates, for example for setting of loop variables.) 

"I wrote a tiny WSGI application (about 50 lines of code) that just uses werkzeug’s routing system and uses template names as endpoints. These templates are then loaded with Mako, rendered and returned as responses." Sounds like an interesting expreiment. I'd be interested to see inside, and maybe to inflict the same task on Evoque to see emerges... is this available somewhere?</description>
		<content:encoded><![CDATA[<p>&#8220;I think as long as you can limit the syntax to expressions there are ways to restrict Python enough to allow the execution of untrusted code.&#8221; This is exactly what I do in Evoque (http://evoque.gizmojo.org) &#8230; only expressions, by design. And the evaluation context may only be &#8220;extended&#8221; from the application side, not (explictly) from within a template. (There are of course implicit context modifications from within templates, for example for setting of loop variables.) </p>
<p>&#8220;I wrote a tiny WSGI application (about 50 lines of code) that just uses werkzeug’s routing system and uses template names as endpoints. These templates are then loaded with Mako, rendered and returned as responses.&#8221; Sounds like an interesting expreiment. I&#8217;d be interested to see inside, and maybe to inflict the same task on Evoque to see emerges&#8230; is this available somewhere?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Larson</title>
		<link>http://lucumr.pocoo.org/cogitations/2008/01/01/python-template-engine-comparison/#comment-1372</link>
		<author>Eric Larson</author>
		<pubDate>Wed, 02 Jan 2008 21:31:59 +0000</pubDate>
		<guid>http://lucumr.pocoo.org/cogitations/2008/01/01/python-template-engine-comparison/#comment-1372</guid>
		<description>Great overview of these excellent templating libraries. 

If you (or anyone else) is interested in an XSLT based WSGI middleware templating solution, there is XSLTemplates (http://code.google.com/p/xsltemplates). I am the author, but really it is just a simple way to use XSLT with 4Suite/Amara within WSGI web applications. 

I tried to use Kid and just couldn't grab onto the mix between XSLT and other templating languages, so I looked into BuffetXSLT, which was lacking the more obvious templating pieces like passing in parameters and data structures (node-set in XSLT). This lead me to XSLTemplates. 

I'm aiming at making it easy to do things like adding your own helper functions and sending parameters and node-sets to templates. If any one does try it out, feel free to send along comments or suggestions.</description>
		<content:encoded><![CDATA[<p>Great overview of these excellent templating libraries. </p>
<p>If you (or anyone else) is interested in an XSLT based WSGI middleware templating solution, there is XSLTemplates (http://code.google.com/p/xsltemplates). I am the author, but really it is just a simple way to use XSLT with 4Suite/Amara within WSGI web applications. </p>
<p>I tried to use Kid and just couldn&#8217;t grab onto the mix between XSLT and other templating languages, so I looked into BuffetXSLT, which was lacking the more obvious templating pieces like passing in parameters and data structures (node-set in XSLT). This lead me to XSLTemplates. </p>
<p>I&#8217;m aiming at making it easy to do things like adding your own helper functions and sending parameters and node-sets to templates. If any one does try it out, feel free to send along comments or suggestions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Armin Ronacher</title>
		<link>http://lucumr.pocoo.org/cogitations/2008/01/01/python-template-engine-comparison/#comment-1365</link>
		<author>Armin Ronacher</author>
		<pubDate>Wed, 02 Jan 2008 09:05:51 +0000</pubDate>
		<guid>http://lucumr.pocoo.org/cogitations/2008/01/01/python-template-engine-comparison/#comment-1365</guid>
		<description>Before the big parser rewrite Jinja wandered through the AST and intercepted all dangerous operations. This basically works the same with the new parser too, but some things such as "item assignment unpacking during iteration" is not allowed in the new syntax and so there is no check for that any more.

So basically what Jinja does currently is disallowing all access to attributes like "__subclasses__", disallowing attribute modifications on objects passed to the context, recursive includes, infinite loops etc.

I think as long as you can limit the syntax to expressions there are ways to restrict Python enough to allow the execution of untrusted code.</description>
		<content:encoded><![CDATA[<p>Before the big parser rewrite Jinja wandered through the AST and intercepted all dangerous operations. This basically works the same with the new parser too, but some things such as &#8220;item assignment unpacking during iteration&#8221; is not allowed in the new syntax and so there is no check for that any more.</p>
<p>So basically what Jinja does currently is disallowing all access to attributes like &#8220;__subclasses__&#8221;, disallowing attribute modifications on objects passed to the context, recursive includes, infinite loops etc.</p>
<p>I think as long as you can limit the syntax to expressions there are ways to restrict Python enough to allow the execution of untrusted code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Graham Dumpleton</title>
		<link>http://lucumr.pocoo.org/cogitations/2008/01/01/python-template-engine-comparison/#comment-1360</link>
		<author>Graham Dumpleton</author>
		<pubDate>Wed, 02 Jan 2008 02:02:42 +0000</pubDate>
		<guid>http://lucumr.pocoo.org/cogitations/2008/01/01/python-template-engine-comparison/#comment-1360</guid>
		<description>You must have been reading my mind as it was only a few days ago that I was trying to get hold of you on IRC to discuss your opinions on different templating solutions. You weren't around at the time though.

One question I still have though about Jinja is, in practice what it's sandboxing really means, given that in Python it is pretty well impossible to create a restricted execution environment that you can't break out of in some way.

So, what are the benefits of otherwise of sandboxing in Jinja?</description>
		<content:encoded><![CDATA[<p>You must have been reading my mind as it was only a few days ago that I was trying to get hold of you on IRC to discuss your opinions on different templating solutions. You weren&#8217;t around at the time though.</p>
<p>One question I still have though about Jinja is, in practice what it&#8217;s sandboxing really means, given that in Python it is pretty well impossible to create a restricted execution environment that you can&#8217;t break out of in some way.</p>
<p>So, what are the benefits of otherwise of sandboxing in Jinja?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Braydon Fuller</title>
		<link>http://lucumr.pocoo.org/cogitations/2008/01/01/python-template-engine-comparison/#comment-1359</link>
		<author>Braydon Fuller</author>
		<pubDate>Tue, 01 Jan 2008 23:35:12 +0000</pubDate>
		<guid>http://lucumr.pocoo.org/cogitations/2008/01/01/python-template-engine-comparison/#comment-1359</guid>
		<description>"I hope this post sums up why I’m using all three template engines and why I think we should be happy that we can chose between a couple of template engines :-)"

Word! :)

I am using Cheetah on a current project, and haven't run into any problems yet. I'll have to try out Mako and see how it compares, and what will work best for my different projects. I had a similar reaction to Django's templates at first, but haven't used them yet to get to know it better.</description>
		<content:encoded><![CDATA[<p>&#8220;I hope this post sums up why I’m using all three template engines and why I think we should be happy that we can chose between a couple of template engines :-)&#8221;</p>
<p>Word! :)</p>
<p>I am using Cheetah on a current project, and haven&#8217;t run into any problems yet. I&#8217;ll have to try out Mako and see how it compares, and what will work best for my different projects. I had a similar reaction to Django&#8217;s templates at first, but haven&#8217;t used them yet to get to know it better.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
