<?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"
	>
<channel>
	<title>Comments on: SimpleBlog - Part 2</title>
	<atom:link href="http://www.splee.co.uk/2006/10/20/simpleblog-part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.splee.co.uk/2006/10/20/simpleblog-part-2/</link>
	<description>Bring out the g33k</description>
	<pubDate>Thu, 20 Nov 2008 16:37:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: David</title>
		<link>http://www.splee.co.uk/2006/10/20/simpleblog-part-2/#comment-33722</link>
		<dc:creator>David</dc:creator>
		<pubDate>Wed, 22 Aug 2007 01:15:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.splee.co.uk/2006/10/20/simpleblog-part-2/#comment-33722</guid>
		<description>&#62; c = Comment(post=post, author_name="Bob", ...

should be post=p as this is being done from the shell, not the controller (controller does use "post", may cause confusion).</description>
		<content:encoded><![CDATA[<p>&gt; c = Comment(post=post, author_name=&#8221;Bob&#8221;, &#8230;</p>
<p>should be post=p as this is being done from the shell, not the controller (controller does use &#8220;post&#8221;, may cause confusion).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Splee</title>
		<link>http://www.splee.co.uk/2006/10/20/simpleblog-part-2/#comment-20979</link>
		<dc:creator>Splee</dc:creator>
		<pubDate>Sat, 25 Nov 2006 13:57:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.splee.co.uk/2006/10/20/simpleblog-part-2/#comment-20979</guid>
		<description>@Michael: I usually use this convention too but I wanted to be more explicit with the way that urls are created.  It may not be apparent to someone new to TurboGears/CherryPy how exactly the post id is given to the method.

@Iain: No problem, I'm glad you found them useful.

@Matthew: Fixed.  Thanks for pointing it out.</description>
		<content:encoded><![CDATA[<p>@Michael: I usually use this convention too but I wanted to be more explicit with the way that urls are created.  It may not be apparent to someone new to TurboGears/CherryPy how exactly the post id is given to the method.</p>
<p>@Iain: No problem, I&#8217;m glad you found them useful.</p>
<p>@Matthew: Fixed.  Thanks for pointing it out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Webber</title>
		<link>http://www.splee.co.uk/2006/10/20/simpleblog-part-2/#comment-20761</link>
		<dc:creator>Matthew Webber</dc:creator>
		<pubDate>Fri, 24 Nov 2006 21:45:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.splee.co.uk/2006/10/20/simpleblog-part-2/#comment-20761</guid>
		<description>In the post kid template above, you need to add a closing html tag, which is to say

open-bracket forward-slash html close-bracket

I think a previous poster tried to say this, but the comment system mangled the text.</description>
		<content:encoded><![CDATA[<p>In the post kid template above, you need to add a closing html tag, which is to say</p>
<p>open-bracket forward-slash html close-bracket</p>
<p>I think a previous poster tried to say this, but the comment system mangled the text.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Iain Duncan</title>
		<link>http://www.splee.co.uk/2006/10/20/simpleblog-part-2/#comment-19189</link>
		<dc:creator>Iain Duncan</dc:creator>
		<pubDate>Mon, 20 Nov 2006 07:39:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.splee.co.uk/2006/10/20/simpleblog-part-2/#comment-19189</guid>
		<description>Fantastic job on these tutorials! Many thanks.</description>
		<content:encoded><![CDATA[<p>Fantastic job on these tutorials! Many thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Steinfeld</title>
		<link>http://www.splee.co.uk/2006/10/20/simpleblog-part-2/#comment-17280</link>
		<dc:creator>Michael Steinfeld</dc:creator>
		<pubDate>Mon, 13 Nov 2006 20:25:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.splee.co.uk/2006/10/20/simpleblog-part-2/#comment-17280</guid>
		<description>duh..

this:

&lt;a href="/post?id=${post.id}" rel="nofollow"&gt;Post title here&lt;/a&gt;

to

&lt;a href="/post/${post.id}" rel="nofollow"&gt;Post title here&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>duh..</p>
<p>this:</p>
<p><a href="/post?id=${post.id}" rel="nofollow">Post title here</a></p>
<p>to</p>
<p><a href="/post/${post.id}" rel="nofollow">Post title here</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Steinfeld</title>
		<link>http://www.splee.co.uk/2006/10/20/simpleblog-part-2/#comment-17278</link>
		<dc:creator>Michael Steinfeld</dc:creator>
		<pubDate>Mon, 13 Nov 2006 20:23:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.splee.co.uk/2006/10/20/simpleblog-part-2/#comment-17278</guid>
		<description>A few other things worth mentioning.

first:

make sure to add the closing "" tag in the post.kid template or you error.

second:

since TUrboGears/Cherrypy treat post?id=1 the same as /post/1

you can clean up the URL a bit by changing

&lt;a href="/post?id=${post.id}" rel="nofollow"&gt;Post title here&lt;/a&gt;

to

&lt;a href="/post/${post.id}" rel="nofollow"&gt;Post title here&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>A few other things worth mentioning.</p>
<p>first:</p>
<p>make sure to add the closing &#8220;&#8221; tag in the post.kid template or you error.</p>
<p>second:</p>
<p>since TUrboGears/Cherrypy treat post?id=1 the same as /post/1</p>
<p>you can clean up the URL a bit by changing</p>
<p><a href="/post?id=${post.id}" rel="nofollow">Post title here</a></p>
<p>to</p>
<p><a href="/post/${post.id}" rel="nofollow">Post title here</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred Lin</title>
		<link>http://www.splee.co.uk/2006/10/20/simpleblog-part-2/#comment-14082</link>
		<dc:creator>Fred Lin</dc:creator>
		<pubDate>Thu, 02 Nov 2006 01:49:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.splee.co.uk/2006/10/20/simpleblog-part-2/#comment-14082</guid>
		<description>c = Comment(post=post, author_name="Bob".....

should be 

c = Comment(post=p, author_name="Bob"....


nice tutorial :D</description>
		<content:encoded><![CDATA[<p>c = Comment(post=post, author_name=&#8221;Bob&#8221;&#8230;..</p>
<p>should be </p>
<p>c = Comment(post=p, author_name=&#8221;Bob&#8221;&#8230;.</p>
<p>nice tutorial :D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ori Peleg</title>
		<link>http://www.splee.co.uk/2006/10/20/simpleblog-part-2/#comment-13472</link>
		<dc:creator>Ori Peleg</dc:creator>
		<pubDate>Sun, 29 Oct 2006 18:30:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.splee.co.uk/2006/10/20/simpleblog-part-2/#comment-13472</guid>
		<description>Thanks, great series!

Just one question - does the short version of __init__ work for you? It doesn't for me. I think it's because iterating over a dictionary returns just the keys, and you need setattr to set the attributes in self.


class Post(object):
    def __init__(self, *args, **kw):
        for k,v in kw.iteritems():
            if hasattr(self, k):
                setattr(self, k, v)
</description>
		<content:encoded><![CDATA[<p>Thanks, great series!</p>
<p>Just one question - does the short version of <strong>init</strong> work for you? It doesn&#8217;t for me. I think it&#8217;s because iterating over a dictionary returns just the keys, and you need setattr to set the attributes in self.</p>
<p>class Post(object):<br />
    def <strong>init</strong>(self, <em>args, *</em>kw):<br />
        for k,v in kw.iteritems():<br />
            if hasattr(self, k):<br />
                setattr(self, k, v)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2006-10-21 at Blue Sky On Mars</title>
		<link>http://www.splee.co.uk/2006/10/20/simpleblog-part-2/#comment-12041</link>
		<dc:creator>links for 2006-10-21 at Blue Sky On Mars</dc:creator>
		<pubDate>Sat, 21 Oct 2006 09:23:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.splee.co.uk/2006/10/20/simpleblog-part-2/#comment-12041</guid>
		<description>[...] SimpleBlog - Part 2 at splee.blog (tags: turbogears sqlalchemy python howto) [...]</description>
		<content:encoded><![CDATA[<p>[...] SimpleBlog - Part 2 at splee.blog (tags: turbogears sqlalchemy python howto) [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
