<?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: Serving Dynamic Images from Django error</title>
	<atom:link href="http://www.opensourcetutor.com/2007/10/02/serving-dynamic-images-from-django-error/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.opensourcetutor.com/2007/10/02/serving-dynamic-images-from-django-error/</link>
	<description>On Linux, Web Development, Joomla and Magento commerce</description>
	<lastBuildDate>Mon, 16 Jan 2012 19:55:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Got it working</title>
		<link>http://www.opensourcetutor.com/2007/10/02/serving-dynamic-images-from-django-error/comment-page-1/#comment-256</link>
		<dc:creator>Got it working</dc:creator>
		<pubDate>Sun, 23 Nov 2008 20:39:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.opensourcetutor.com/2007/10/02/serving-dynamic-images-from-django-error/#comment-256</guid>
		<description>Found this snippet looking to do the same thing and get stuck in the same place.  So for full clarity:

def pageview(request):
  return render_to_response(....)

def graph:
   graph = graphdata
  return HttpResponse (graph, &#039;image/png&#039;)

then in views:

pageview:

</description>
		<content:encoded><![CDATA[<p>Found this snippet looking to do the same thing and get stuck in the same place.  So for full clarity:</p>
<p>def pageview(request):<br />
  return render_to_response(&#8230;.)</p>
<p>def graph:<br />
   graph = graphdata<br />
  return HttpResponse (graph, &#8216;image/png&#8217;)</p>
<p>then in views:</p>
<p>pageview:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: avinash</title>
		<link>http://www.opensourcetutor.com/2007/10/02/serving-dynamic-images-from-django-error/comment-page-1/#comment-247</link>
		<dc:creator>avinash</dc:creator>
		<pubDate>Wed, 27 Aug 2008 17:19:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.opensourcetutor.com/2007/10/02/serving-dynamic-images-from-django-error/#comment-247</guid>
		<description>can u be more explixit wat do you mean by /path/to</description>
		<content:encoded><![CDATA[<p>can u be more explixit wat do you mean by /path/to</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: salubrium</title>
		<link>http://www.opensourcetutor.com/2007/10/02/serving-dynamic-images-from-django-error/comment-page-1/#comment-214</link>
		<dc:creator>salubrium</dc:creator>
		<pubDate>Tue, 03 Jun 2008 22:07:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.opensourcetutor.com/2007/10/02/serving-dynamic-images-from-django-error/#comment-214</guid>
		<description>Hi James,

In the django book, it gives an example like my first example.

http://www.djangobook.com/en/1.0/chapter11/

Now, the mistake I made and probably like yourself also, is I then tried to use that code and integrate it into an existing view and then render the image as a part of that view.

The simplest way to get this working is use the above example from the djangobook and then in the template you want the image displayed in, just use html to call the view that displays the image ie:

&lt; &lt;code&gt;img src=&quot;/path/to/img_view&quot; /&gt;

I hope that clarifies it.</description>
		<content:encoded><![CDATA[<p>Hi James,</p>
<p>In the django book, it gives an example like my first example.</p>
<p><a href="http://www.djangobook.com/en/1.0/chapter11/" rel="nofollow">http://www.djangobook.com/en/1.0/chapter11/</a></p>
<p>Now, the mistake I made and probably like yourself also, is I then tried to use that code and integrate it into an existing view and then render the image as a part of that view.</p>
<p>The simplest way to get this working is use the above example from the djangobook and then in the template you want the image displayed in, just use html to call the view that displays the image ie:</p>
<p>< <code>img src=&#8221;/path/to/img_view&#8221; /></p>
<p>I hope that clarifies it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://www.opensourcetutor.com/2007/10/02/serving-dynamic-images-from-django-error/comment-page-1/#comment-212</link>
		<dc:creator>James</dc:creator>
		<pubDate>Tue, 03 Jun 2008 20:44:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.opensourcetutor.com/2007/10/02/serving-dynamic-images-from-django-error/#comment-212</guid>
		<description>Hitting the same issue but being a novice to all things Django don&#039;t really understand the solution, how would I go about calling a separate view from the template to bring in the binary image? Cheers</description>
		<content:encoded><![CDATA[<p>Hitting the same issue but being a novice to all things Django don&#8217;t really understand the solution, how would I go about calling a separate view from the template to bring in the binary image? Cheers</p>
]]></content:encoded>
	</item>
</channel>
</rss>

