<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/django/tags/query</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sun, 23 Nov 2008 15:49:15 GMT</pubDate>
<item>
<title>(Django) Template Query Debug - jonhenshaw</title>
<link>http://snipplr.com/view/5741/template-query-debug/</link>
<description><![CDATA[ <p>I often find something like this lurking at the end of my base templates - it'll show you which queries were run while generating the current page, but they'll start out hidden so as not to be a pain.

Of course, before this works, you'll need to satisfy all the criteria for getting debug information in your template context:

   1. Have 'django.core.context_processors.debug' in your TEMPLATE_CONTEXT_PROCESSORS setting (it was there in the default settings, last time I checked).
   2. Have your current IP in your INTERNAL_IPS setting.
   3. Use RequestContext when rendering the current template (if you're using a generic view, you're already using RequestContext).</p> ]]></description>
<pubDate>Mon, 07 Apr 2008 16:20:35 GMT</pubDate>
<guid>http://snipplr.com/view/5741/template-query-debug/</guid>
</item>
</channel>
</rss>