<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to use generic views in Django</title>
	<atom:link href="http://www.grenadepod.com/2009/11/09/how-to-use-generic-views-in-django/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.grenadepod.com/2009/11/09/how-to-use-generic-views-in-django/</link>
	<description>Dispersing the Seeds</description>
	<lastBuildDate>Fri, 03 Sep 2010 18:21:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
	<item>
		<title>By: d-duck</title>
		<link>http://www.grenadepod.com/2009/11/09/how-to-use-generic-views-in-django/comment-page-1/#comment-9</link>
		<dc:creator>d-duck</dc:creator>
		<pubDate>Wed, 11 Nov 2009 10:05:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.grenadepod.com/?p=256#comment-9</guid>
		<description>it&#039;s also worth mentioning that with create_update functions you can set &#039;login_required&#039; to True. if you do that, Django will only allows these URLs for people that are logged in.</description>
		<content:encoded><![CDATA[<p>it&#8217;s also worth mentioning that with create_update functions you can set &#8216;login_required&#8217; to True. if you do that, Django will only allows these URLs for people that are logged in.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pulegium</title>
		<link>http://www.grenadepod.com/2009/11/09/how-to-use-generic-views-in-django/comment-page-1/#comment-8</link>
		<dc:creator>pulegium</dc:creator>
		<pubDate>Tue, 10 Nov 2009 17:41:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.grenadepod.com/?p=256#comment-8</guid>
		<description>of course you can. add &#039;extra_context&#039; entry to the dictionary and include as many as you like.

Your classes:

&lt;pre lang=&quot;python&quot;&gt;
class Recipe(models.Model):
    ...
class Ingredient(models.Model):
    ...
&lt;/pre&gt;

Your &#039;queryset&#039; dictionary:
&lt;pre lang=&quot;python&quot;&gt;
dish_info = {
    &#039;queryset&#039;: Ingredient.object.filter(&lt;some filtering here, for example Recipe ID&gt;),
    &#039;extra_content&#039;: { &#039;recipe&#039;: Recipe.object.filer(&lt;filtering for related content, may be category name&gt;), }
}
&lt;/pre&gt;

Hope this helps</description>
		<content:encoded><![CDATA[<p>of course you can. add &#8216;extra_context&#8217; entry to the dictionary and include as many as you like.</p>
<p>Your classes:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">class</span> Recipe<span style="color: black;">&#40;</span>models.<span style="color: black;">Model</span><span style="color: black;">&#41;</span>:
    ...
<span style="color: #ff7700;font-weight:bold;">class</span> Ingredient<span style="color: black;">&#40;</span>models.<span style="color: black;">Model</span><span style="color: black;">&#41;</span>:
    ...</pre></div></div>

<p>Your &#8216;queryset&#8217; dictionary:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">dish_info = <span style="color: black;">&#123;</span>
    <span style="color: #483d8b;">'queryset'</span>: Ingredient.<span style="color: #008000;">object</span>.<span style="color: #008000;">filter</span><span style="color: black;">&#40;</span><span style="color: #66cc66;">&lt;</span>some filtering here, <span style="color: #ff7700;font-weight:bold;">for</span> example Recipe ID<span style="color: #66cc66;">&gt;</span><span style="color: black;">&#41;</span>,
    <span style="color: #483d8b;">'extra_content'</span>: <span style="color: black;">&#123;</span> <span style="color: #483d8b;">'recipe'</span>: Recipe.<span style="color: #008000;">object</span>.<span style="color: black;">filer</span><span style="color: black;">&#40;</span><span style="color: #66cc66;">&lt;</span>filtering <span style="color: #ff7700;font-weight:bold;">for</span> related content, may be category name<span style="color: #66cc66;">&gt;</span><span style="color: black;">&#41;</span>, <span style="color: black;">&#125;</span>
<span style="color: black;">&#125;</span></pre></div></div>

<p>Hope this helps</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kev</title>
		<link>http://www.grenadepod.com/2009/11/09/how-to-use-generic-views-in-django/comment-page-1/#comment-7</link>
		<dc:creator>Kev</dc:creator>
		<pubDate>Tue, 10 Nov 2009 14:24:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.grenadepod.com/?p=256#comment-7</guid>
		<description>So the generic view can only display items from the same model, or can I pass another model to the template? Let&#039;s say I want to display list of ingredients for a dish, but I also want to have a list of related recipes listed along? If that makes sense?</description>
		<content:encoded><![CDATA[<p>So the generic view can only display items from the same model, or can I pass another model to the template? Let&#8217;s say I want to display list of ingredients for a dish, but I also want to have a list of related recipes listed along? If that makes sense?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kwijibo</title>
		<link>http://www.grenadepod.com/2009/11/09/how-to-use-generic-views-in-django/comment-page-1/#comment-6</link>
		<dc:creator>Kwijibo</dc:creator>
		<pubDate>Tue, 10 Nov 2009 12:03:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.grenadepod.com/?p=256#comment-6</guid>
		<description>nice post, thanks! I&#039;ve never used generic views before - kept on writing my own, but I guess I need to try.

Thanks anyway, Jan</description>
		<content:encoded><![CDATA[<p>nice post, thanks! I&#8217;ve never used generic views before &#8211; kept on writing my own, but I guess I need to try.</p>
<p>Thanks anyway, Jan</p>
]]></content:encoded>
	</item>
</channel>
</rss>
