A simple Django life stream

After reading Ryan Bergs' "The basics of creating a tumblelog with Django" (part1) and (part2), I realized that I wanted a similar tumblog/life stream but I didn't want to have to go through all the work of saving those objects to the database. After all, isn't all that data already stored in their respective systems. And since I am using FriendFeed, which is again duplicating all that data, I don't want to be duplicating it yet another time.

That's when the light bulb went off. Using the FriendFeed API and a bit of caching I can pull in my lifestream from FriendFeed using only a custom tag. So I came up with what I call lifefeed

Just add "lifefeed" to your installed apps and you can now do this from any template

{% load lifefeed %}{% load cache %}
{% cache 900 friendfeed %}
	{% lifefeed "YOUR FRIEND FEED USERNAME" %}
{% endcache %}
You can use the default friendfeed.html template that comes with lifefeed or use your own. You will most definitely want to use your own CSS to style the items since I am no CSS guru.

lifefeed is very simple right now but I would like to add more to it. Like

  • Consolidate duplicate twitter/pownce/brightkite posts
  • Display FriendFeed comments

To see an example of lifefeed in action check the sidebar on this page, you may have to scroll down a bit.

So what do you think?

Technorati Tags:

Intense Debate Import Hack

Recently I wanted to try out the Intense Debate commenting system on this blog. I didn't want to lose all the comments that I had already and Intense Debate only supports importing comments from Blogger, etc but not custom blog software. Since I wrote this blog using the Django framework using django.contrib.comments I needed to come up with my own solution.

It only took one Tamper Data request to see how an anonymous comment was posted into the Intense Debate system. A few minutes later I had a script to import my old comments into Intense Debate.

intenseDebate.py

import intenseDebate
intenseDebate.postComment(blogpostid="", acctid="", anonName="", anonEmail="", \
    anonURL="", comment="")

  • blogpostid is the unique Intense Debate postId. You can find this easily on any Intense Debate powered page using the firebug dom tab. The key to look for is "IDCommentScript".
  • acctid is your Intense Debate accountId. This can also be found using the firebug dom tab. The key to look for is "IDWUserWidget.acctid"
  • anonName is the name of the commenter
  • anonEmail is the commenters email address
  • anonURL is the commenters web address
  • comment is the text of the comment

This method of importing comments does have it's problems.

  1. Manual process to get the blogpostid.
  2. No way of getting the Date/Time into Intense Debate.
But it's better than no comments at all.

Footnote: I don't have a problem with Django comments, especially when paired with django-comment-utils, I just wanted to give Intense Debate a try.

Technorati Tags:

Two Guys On Beer

A big thanks to David Martorana of Code Contortionist and Johnny Bilotta of Johnny Nines for putting some BarDiver.com coaster to good use in their first video podcast, Two Guys On Beer. Check out the Stout Shootout! to learn about some Irish Stout and find out which one our hosts prefer. And if you want to check out the bar they are filming in, make your way over to National Mechanics.

Technorati Tags:

Django in June

This is going to be one busy weekend. Friday after work I am going to Coors Field to watch the Rockies vs. the Devil Rays. I am driving straight from the game to DIA to catch the red eye into Logan where I will pick up my rental car and go directly to the Django in June un-conference.

I am really looking forward to this. It will be great to meet some of the great people in the Django community. I also hope to meet some people in Boston that might be interested in helping me populate boston.bardiver.com with some more great bars. To ensure that this happens I will also be bringing with me some BarDiver.com Schwag to give out. ;)

Once the conference is done with I will be driving up to New Hampshire to play golf with my Dad on Fathers Day. This should be a lot of fun. This will be the 3rd time I have played this year. After that and a quick visit with my Grandmother, I will be driving back into Boston to catch my flight back to Denver. Sunday night I might actually get 8 hours of sleep before I have to be at work again on Monday morning.

Technorati Tags:

Adding Lijit support to your RSS feeds

I just finished adding Lijit support to one of the BarDiver.com RSS feeds.

Lijit is a new service that aggregates your online identities and makes them searchable. You can get more information on Lijit here.

Lijit can use any RSS feed as and identity but with just a little extra work you can add meta information to that RSS feed to add even more value. The Lijit developers RSS page has all the info but the basics are straight forward. For every <item> in the RSS feed add a <category> tag that contains either the text ".good" or ".bad". For an example check out my BarDiver.com profile visited bars feed. You can see the results here. Those little green and yellow markers show that you got it right.

Lijit is a great service that I can really see taking off. I hope this encourages more developers to add Lijit support to their RSS feeds.

Technorati Tags:
More Posts >


Powered by Django.