Archive for June 02, 2008

Yay for contribution!

02.06.2008 19:45

posted by: Benjamin Smith

Posted Under: , , ,

I was having troubles with the way my rss item categories (tags) were displaying on technorati and other feed readers, so I decided to fix it. This is why I love F/OSS! Since I’ve been using this software I’ve contributed a whopping 2 patches (heh, heh). It might not be a lot, but it matters! I didn’t post my last patch, but I will from now on. Here’s the most recent one:

# HG changeset patch
# User bsmith@linode.just-another.net
# Date 1212450093 14400
# Node ID 2c4fb2b21cc5c7b9cfbf7a1692af6e34a9bb5391
# Parent  fb8d51dd50e13eb7d2b63c646a9f2bb5cf21ec3c
Atom class wants a dict for item categories, django does not.

diff -r fb8d51dd50e1 -r 2c4fb2b21cc5 apps/feed/blog_feeds.py
--- a/apps/feed/blog_feeds.py   Fri May 30 11:13:58 2008 +0300
+++ b/apps/feed/blog_feeds.py   Mon Jun 02 19:41:33 2008 -0400
@@ -59,7 +59,10 @@ def _BlogEntries(Feed, type='atom'):
             return {'type': 'html'}, html

         def item_categories(self, item):
—            return ({'term': unicode(tag)} for tag in item.get_tags())
+            if (type == 'atom'):
+                return ({'term': unicode(tag)} for tag in item.get_tags())
+            else:
+                return (unicode(tag) for tag in item.get_tags())

         def item_links(self, item):
             return ({'rel': u'self', 'href': self.item_id(item)},

Hope this helps!

0 comments | 0 pingbacks

Yay! Just moved hosting providers

02.06.2008 14:31

posted by: Benjamin Smith

Posted Under: , ,

I just made the move to Linode for my hosting needs. After some initial ab tests, I’ve seen improved results out of my current setup. Previously I had hosted my site at home on an older Linux box I had laying around, and before that I had hosted on my friends colo via a business cable line. Now I’m on a true hosting environment that fits my needs nicely.

0 comments | 0 pingbacks
Previous day Next day