<?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: Django Middleware vs. Context Processors</title>
	<atom:link href="http://jboxer.com/2009/05/django-middleware-vs-context-processors/feed/" rel="self" type="application/rss+xml" />
	<link>http://jboxer.com/2009/05/django-middleware-vs-context-processors/</link>
	<description>I change the directions of small pieces of metal for a living.</description>
	<lastBuildDate>Fri, 30 Jul 2010 17:16:17 -0700</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Andrew A. Sailer</title>
		<link>http://jboxer.com/2009/05/django-middleware-vs-context-processors/comment-page-1/#comment-247</link>
		<dc:creator>Andrew A. Sailer</dc:creator>
		<pubDate>Sat, 06 Mar 2010 19:56:50 +0000</pubDate>
		<guid isPermaLink="false">http://jboxer.com/?p=193#comment-247</guid>
		<description>Thanks for this blog. I am new at python and this is a big help.</description>
		<content:encoded><![CDATA[<p>Thanks for this blog. I am new at python and this is a big help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 汇率网</title>
		<link>http://jboxer.com/2009/05/django-middleware-vs-context-processors/comment-page-1/#comment-34</link>
		<dc:creator>汇率网</dc:creator>
		<pubDate>Thu, 21 May 2009 02:54:42 +0000</pubDate>
		<guid isPermaLink="false">http://jboxer.com/?p=193#comment-34</guid>
		<description>I like middleware better</description>
		<content:encoded><![CDATA[<p>I like middleware better</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Nyström</title>
		<link>http://jboxer.com/2009/05/django-middleware-vs-context-processors/comment-page-1/#comment-33</link>
		<dc:creator>Daniel Nyström</dc:creator>
		<pubDate>Tue, 19 May 2009 08:38:22 +0000</pubDate>
		<guid isPermaLink="false">http://jboxer.com/?p=193#comment-33</guid>
		<description>oops, direct_to_template should have &quot;request&quot; as first argument:

  return direct_to_template(request, &quot;some_url_name&quot;, {&quot;some_var&quot;: some_val})

Please edit.</description>
		<content:encoded><![CDATA[<p>oops, direct_to_template should have &#8220;request&#8221; as first argument:</p>
<p>  return direct_to_template(request, &#8220;some_url_name&#8221;, {&#8220;some_var&#8221;: some_val})</p>
<p>Please edit.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Nyström</title>
		<link>http://jboxer.com/2009/05/django-middleware-vs-context-processors/comment-page-1/#comment-32</link>
		<dc:creator>Daniel Nyström</dc:creator>
		<pubDate>Tue, 19 May 2009 08:32:23 +0000</pubDate>
		<guid isPermaLink="false">http://jboxer.com/?p=193#comment-32</guid>
		<description>I prefer using &quot;direct_to_template&quot; in my views which do that RequestContext automagically and unbloat the code a bit:

from django.views.generic.simple import direct_to_template

# some other view code

def my_view (request, obj_id):
    obj     = get_object_or_404(SomeModel, pk=int(obj_id))

    # do some stuff, including:
    some_function(request.user)

    return direct_to_template(&quot;some_url_name&quot;, {&quot;some_var&quot;: some_val})</description>
		<content:encoded><![CDATA[<p>I prefer using &#8220;direct_to_template&#8221; in my views which do that RequestContext automagically and unbloat the code a bit:</p>
<p>from django.views.generic.simple import direct_to_template</p>
<p># some other view code</p>
<p>def my_view (request, obj_id):<br />
    obj     = get_object_or_404(SomeModel, pk=int(obj_id))</p>
<p>    # do some stuff, including:<br />
    some_function(request.user)</p>
<p>    return direct_to_template(&#8220;some_url_name&#8221;, {&#8220;some_var&#8221;: some_val})</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John M</title>
		<link>http://jboxer.com/2009/05/django-middleware-vs-context-processors/comment-page-1/#comment-31</link>
		<dc:creator>John M</dc:creator>
		<pubDate>Tue, 19 May 2009 04:52:24 +0000</pubDate>
		<guid isPermaLink="false">http://jboxer.com/?p=193#comment-31</guid>
		<description>I&#039;m still reading the docs on getting user stuff and doing authentication, but the docs are pretty clear that the user is avail in the request from a view, unless I&#039;m not seeing what you&#039;re really after?

http://docs.djangoproject.com/en/dev/topics/auth/#limiting-access-to-logged-in-users-that-pass-a-test

Nice post!

John</description>
		<content:encoded><![CDATA[<p>I&#8217;m still reading the docs on getting user stuff and doing authentication, but the docs are pretty clear that the user is avail in the request from a view, unless I&#8217;m not seeing what you&#8217;re really after?</p>
<p><a href="http://docs.djangoproject.com/en/dev/topics/auth/#limiting-access-to-logged-in-users-that-pass-a-test" rel="nofollow">http://docs.djangoproject.com/en/dev/topics/auth/#limiting-access-to-logged-in-users-that-pass-a-test</a></p>
<p>Nice post!</p>
<p>John</p>
]]></content:encoded>
	</item>
</channel>
</rss>
