<?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: Speedy Django Development</title>
	<atom:link href="http://coderseye.com/2006/speedy-django-development.html/feed" rel="self" type="application/rss+xml" />
	<link>http://coderseye.com/2006/speedy-django-development.html</link>
	<description>Stuff that catches a Passionate Programmer's Eye</description>
	<lastBuildDate>Tue, 16 Mar 2010 15:30:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bruce</title>
		<link>http://coderseye.com/2006/speedy-django-development.html/comment-page-1#comment-3949</link>
		<dc:creator>Bruce</dc:creator>
		<pubDate>Tue, 27 Feb 2007 17:09:27 +0000</pubDate>
		<guid isPermaLink="false">http://coderseye.com/2006/speedy-django-development.html#comment-3949</guid>
		<description>Alright.   I have added a few lines since I wrote the blog entry.  Here&#039;s the somewhat more developed private method from the class which does that.  If you strip the logs and comments, it is 13 lines.

&lt;pre&gt;&lt;code&gt;
def _create_thumb(self, force):
        log.debug(&quot;Thumbnailing (%i x %i) %s&quot;, self.x, self.y, self.parent.filename)
        do_create = True

        if files.is_file(self.filename):
            if force:
                log.debug(&quot;Forcing removal of existing thumbnail: %s&quot; % self.filename)
                os.remove(self.filename)

            elif files.newest_filename(self.parent.filename, self.filename) == self.parent.filename:
                log.debug(&quot;Found existing (older than parent image) thumbnail, removing: %s&quot;, self.filename)
                os.remove(self.filename)

            else:
                log.debug(&quot;Found existing thumbnail, skipping create: %s&quot;, self.filename)
                do_create = False

        if do_create:
            im = Image.open(self.parent.filename)
            im.thumbnail((self.x, self.y), Image.ANTIALIAS)
            im.save(self.filename, &quot;JPEG&quot;)
            log.debug(&quot;Created thumbnail: %s&quot;, self.filename)
&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Alright.   I have added a few lines since I wrote the blog entry.  Here&#8217;s the somewhat more developed private method from the class which does that.  If you strip the logs and comments, it is 13 lines.</p>
<pre><code>
def _create_thumb(self, force):
        log.debug("Thumbnailing (%i x %i) %s", self.x, self.y, self.parent.filename)
        do_create = True

        if files.is_file(self.filename):
            if force:
                log.debug("Forcing removal of existing thumbnail: %s" % self.filename)
                os.remove(self.filename)

            elif files.newest_filename(self.parent.filename, self.filename) == self.parent.filename:
                log.debug("Found existing (older than parent image) thumbnail, removing: %s", self.filename)
                os.remove(self.filename)

            else:
                log.debug("Found existing thumbnail, skipping create: %s", self.filename)
                do_create = False

        if do_create:
            im = Image.open(self.parent.filename)
            im.thumbnail((self.x, self.y), Image.ANTIALIAS)
            im.save(self.filename, "JPEG")
            log.debug("Created thumbnail: %s", self.filename)
</code></pre>
 <a href="http://coderseye.com/wp-content/plugins/cubepoints/cp_about.php?u=2&width=500&height=200" title="CubePoints - About" class="thickbox">?</a>]]></content:encoded>
	</item>
	<item>
		<title>By: Alessandro Ronchi</title>
		<link>http://coderseye.com/2006/speedy-django-development.html/comment-page-1#comment-3948</link>
		<dc:creator>Alessandro Ronchi</dc:creator>
		<pubDate>Tue, 27 Feb 2007 16:29:38 +0000</pubDate>
		<guid isPermaLink="false">http://coderseye.com/2006/speedy-django-development.html#comment-3948</guid>
		<description>Can you out your 7 lines of code to use thumbnails? I have to do the same thing, and it would very useful for me.

If an image is removed, is the thumbnail removed too?</description>
		<content:encoded><![CDATA[<p>Can you out your 7 lines of code to use thumbnails? I have to do the same thing, and it would very useful for me.</p>
<p>If an image is removed, is the thumbnail removed too?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Moffitt</title>
		<link>http://coderseye.com/2006/speedy-django-development.html/comment-page-1#comment-297</link>
		<dc:creator>Chris Moffitt</dc:creator>
		<pubDate>Mon, 10 Jul 2006 13:42:59 +0000</pubDate>
		<guid isPermaLink="false">http://coderseye.com/2006/speedy-django-development.html#comment-297</guid>
		<description>It&#039;s great to see you&#039;re working on a Django based store.  We have a project called Satchmo that is attempting to build a Django-based framework for use in online stores.

Come check us out here - http://satchmo.python-hosting.com/wiki

We&#039;re in the very early stages and would welcome any help.  However, it is amazing how quick and powerful Django is.  for instance, I&#039;ve incorporated Nesh&#039;s thumbnails into the store and it is really easy to create thumbnails and automatically cache them.  Or, maybe you can use some of the models/code we&#039;ve put together to help make your transition even easier!

Thanks,
Chris</description>
		<content:encoded><![CDATA[<p>It&#8217;s great to see you&#8217;re working on a Django based store.  We have a project called Satchmo that is attempting to build a Django-based framework for use in online stores.</p>
<p>Come check us out here &#8211; <a href="http://satchmo.python-hosting.com/wiki" rel="nofollow">http://satchmo.python-hosting.com/wiki</a></p>
<p>We&#8217;re in the very early stages and would welcome any help.  However, it is amazing how quick and powerful Django is.  for instance, I&#8217;ve incorporated Nesh&#8217;s thumbnails into the store and it is really easy to create thumbnails and automatically cache them.  Or, maybe you can use some of the models/code we&#8217;ve put together to help make your transition even easier!</p>
<p>Thanks,<br />
Chris</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->