<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Using Jinja With Django</title>
	<atom:link href="http://www.davidcramer.net/code/113/using-jinja-with-django.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.davidcramer.net/code/113/using-jinja-with-django.html</link>
	<description>A blog about Django, JavaScript, CSS, and general web development.</description>
	<pubDate>Wed, 20 Aug 2008 15:48:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Cassie</title>
		<link>http://www.davidcramer.net/code/113/using-jinja-with-django.html#comment-19889</link>
		<dc:creator>Cassie</dc:creator>
		<pubDate>Sat, 17 May 2008 14:29:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/?p=113#comment-19889</guid>
		<description>hi David I was wondering if you were the David Cramer from Illinois that is in CYT. DOn't think I'm stalking you I am from CYT and I was wondering if I googled names from CYT they would come up. Just wondering.</description>
		<content:encoded><![CDATA[<p>hi David I was wondering if you were the David Cramer from Illinois that is in CYT. DOn&#8217;t think I&#8217;m stalking you I am from CYT and I was wondering if I googled names from CYT they would come up. Just wondering.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://www.davidcramer.net/code/113/using-jinja-with-django.html#comment-19718</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Sun, 30 Mar 2008 19:51:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/?p=113#comment-19718</guid>
		<description>There are a couple of great Jinja features that David left out.

First is macros, with support for recursion. Writing template code for producing trees is difficult, making it tempting to produce markup in a view or templatetag. That's a pretty glaring omission on Django's part, IMO. Jinja's loops support recursions too.

The second is that with a normal parenthesized parameter syntax, you can pass more than one argument to a filter or method. This is absolutely necessary for for some kinds of filters which in Django have to parse an argument string. The filter syntax is nice looking, but without parentheses it's very limited to a strict left-to-write precedence rule. This also encourages more view logic and templatetags.</description>
		<content:encoded><![CDATA[<p>There are a couple of great Jinja features that David left out.</p>
<p>First is macros, with support for recursion. Writing template code for producing trees is difficult, making it tempting to produce markup in a view or templatetag. That&#8217;s a pretty glaring omission on Django&#8217;s part, IMO. Jinja&#8217;s loops support recursions too.</p>
<p>The second is that with a normal parenthesized parameter syntax, you can pass more than one argument to a filter or method. This is absolutely necessary for for some kinds of filters which in Django have to parse an argument string. The filter syntax is nice looking, but without parentheses it&#8217;s very limited to a strict left-to-write precedence rule. This also encourages more view logic and templatetags.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg</title>
		<link>http://www.davidcramer.net/code/113/using-jinja-with-django.html#comment-19717</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Sun, 30 Mar 2008 19:15:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/?p=113#comment-19717</guid>
		<description>I don't see much reason to consider replacing Django's tightly integrated template system with an external, un-official one. The reasons listed in this article are vague and lack any backing.

I'm not trying to flame here, but I really don't see what Jinja can do for me that Django can't. I don't think you should ever have Python code or extensive logic in template files, either.

Again, no flame intended, but one has to be really careful when telling new (or old) Django developers that something is better when there isn't much here to substantiate that notion.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t see much reason to consider replacing Django&#8217;s tightly integrated template system with an external, un-official one. The reasons listed in this article are vague and lack any backing.</p>
<p>I&#8217;m not trying to flame here, but I really don&#8217;t see what Jinja can do for me that Django can&#8217;t. I don&#8217;t think you should ever have Python code or extensive logic in template files, either.</p>
<p>Again, no flame intended, but one has to be really careful when telling new (or old) Django developers that something is better when there isn&#8217;t much here to substantiate that notion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.davidcramer.net/code/113/using-jinja-with-django.html#comment-19716</link>
		<dc:creator>David</dc:creator>
		<pubDate>Sun, 30 Mar 2008 13:40:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/?p=113#comment-19716</guid>
		<description>Django isn't that much safer than Jinja. Both are fully sandboxed, Jinja just allows you to do more in it than Django, without extra hassle with template tag creation etc..</description>
		<content:encoded><![CDATA[<p>Django isn&#8217;t that much safer than Jinja. Both are fully sandboxed, Jinja just allows you to do more in it than Django, without extra hassle with template tag creation etc..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://www.davidcramer.net/code/113/using-jinja-with-django.html#comment-19715</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Sun, 30 Mar 2008 13:37:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/?p=113#comment-19715</guid>
		<description>David, I mean that risk of injecting harmful python code into templates is bigger than not to allow python code in templates directly. 

And again, I don't see any valuable (for me of course) reasons to switch to Jinja. So all others reasons are more subjective than objective.</description>
		<content:encoded><![CDATA[<p>David, I mean that risk of injecting harmful python code into templates is bigger than not to allow python code in templates directly. </p>
<p>And again, I don&#8217;t see any valuable (for me of course) reasons to switch to Jinja. So all others reasons are more subjective than objective.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ned</title>
		<link>http://www.davidcramer.net/code/113/using-jinja-with-django.html#comment-19714</link>
		<dc:creator>Ned</dc:creator>
		<pubDate>Sun, 30 Mar 2008 12:19:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/?p=113#comment-19714</guid>
		<description>If Jinja doesn't do autoescaping, then be very careful.  Django's autoescaping is the best thing they've done to improve the security of Django sites in a long time.  It prevents human error from creating XSS holes.</description>
		<content:encoded><![CDATA[<p>If Jinja doesn&#8217;t do autoescaping, then be very careful.  Django&#8217;s autoescaping is the best thing they&#8217;ve done to improve the security of Django sites in a long time.  It prevents human error from creating XSS holes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.davidcramer.net/code/113/using-jinja-with-django.html#comment-19706</link>
		<dc:creator>David</dc:creator>
		<pubDate>Sun, 30 Mar 2008 09:30:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/?p=113#comment-19706</guid>
		<description>It converts them when the file is initialized, it doesnt do it over and over.

And if you're at risk of your template editors hacking your site, then they shouldn't be editing templates..</description>
		<content:encoded><![CDATA[<p>It converts them when the file is initialized, it doesnt do it over and over.</p>
<p>And if you&#8217;re at risk of your template editors hacking your site, then they shouldn&#8217;t be editing templates..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://www.davidcramer.net/code/113/using-jinja-with-django.html#comment-19705</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Sun, 30 Mar 2008 09:28:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/?p=113#comment-19705</guid>
		<description>Hmmm, I really don't see any reasons for me to switch to Jinja. I really like the idea to not write python code in template language. Designer doesn't need to know python. And there is less possibility to hack site via template editing.
Converting filters (on-the-fly I think?) doesn't seem a good idea too and kills performance.</description>
		<content:encoded><![CDATA[<p>Hmmm, I really don&#8217;t see any reasons for me to switch to Jinja. I really like the idea to not write python code in template language. Designer doesn&#8217;t need to know python. And there is less possibility to hack site via template editing.<br />
Converting filters (on-the-fly I think?) doesn&#8217;t seem a good idea too and kills performance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.davidcramer.net/code/113/using-jinja-with-django.html#comment-19699</link>
		<dc:creator>David</dc:creator>
		<pubDate>Sun, 30 Mar 2008 08:50:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/?p=113#comment-19699</guid>
		<description>Baczek, in Jina that could be written as if `user is registered_for event` or `user&#124;is_registered_for(event)`</description>
		<content:encoded><![CDATA[<p>Baczek, in Jina that could be written as if `user is registered_for event` or `user|is_registered_for(event)`</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Baczek</title>
		<link>http://www.davidcramer.net/code/113/using-jinja-with-django.html#comment-19698</link>
		<dc:creator>Baczek</dc:creator>
		<pubDate>Sun, 30 Mar 2008 08:49:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/?p=113#comment-19698</guid>
		<description>I write test filters so their name starts with 'is_', e.g.:

{% if user&#124;is_registered_for:event %} ... {% endif %}

works well and is quite readable.</description>
		<content:encoded><![CDATA[<p>I write test filters so their name starts with &#8216;is_&#8217;, e.g.:</p>
<p>{% if user|is_registered_for:event %} &#8230; {% endif %}</p>
<p>works well and is quite readable.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
