Posted on Jan. 23, 2008 at 11:26 A.M.

Django-threadedcomments is a simple yet flexible threaded commenting system for Django. What I mean when I say threaded is that commenters can reply not only to the original item, but to other comments as well. It is very similar to what Reddit or Digg have in their comments sections.

The idea for this application started about a month and a half ago, when my good friend Tony Hauber asked if I would work with him on a project idea that he had (more info on this in the future). One of the major components of the project would need to be threaded comments. Naturally, the first thing that I did was attempt to make django.contrib.comments work for this purpose. In the end, however, I kept running into problems which all basically boiled down to the fact that django.contrib.comments was never meant for this purpose.

So I used django.contrib.comments as a starting point, brought in some of the best features of the excellent django-comment-utils (In fact, django-threadedcomments actually provides a fair amount of compatiblity with the Managers from django-comment-utils), and added a bit of my own alchemy. This is the result of those things.

A lot of effort has gone into documentation on this project: inline documentation, a tutorial on setting it up with a blog, and complete API documentation. In fact, to see what you'll get after completing the tutorial, head on over to this page. Please excuse my color scheme there--It's the comments that I'm trying to show off, not my design skills (or lack thereof).

If you're worried about the hassle of writing a script to migrate all of your django.contrib.comments comments to this new system, then fear not: there's an included migration script and you'll only need to run python manage.py migratecomments and the migration is automatically taken care of for you.

I really hope that this can be a useful tool for people looking to add a threaded commenting system to a project of theirs. Check it out and see if it's right for you!


Posted on Aug. 7, 2007 at MIDNIGHT

Sphinx Search ROCKS! I'm pretty sure it'll be the solution to my MusicBrainz problems for my secret project. I'm going to set up a simple postgres server holding the MusicBrainz database, with Sphinx Search installed, and have it index on a cron. It'll be awesome! After trying out Lucene and its derivatives and being so underwhelmed, it's exciting to discover an app that truly seems to rock. I'll report back on it later, but right now the indexer is 4 million queries into a 60 million query index. Yeah, it's going to be a while.

I've been wanting to test drive two new technologies this past week, the first is Blueprint, the CSS Framework which I saw on Digg a few days ago. I also really wanted to try some new stuff with FreeComments, including saving people's login information in the session. I'm messing with both of those things in a side-side project related to The Totally Rad Show which I think promises to be really fun. I've spent only a couple of hours on it, but I think it's going to be probably my first project that people end up using.

So, Stick Tuned for a fun announcement from me in the next week or 2 weeks at the latest. (The problem with this project is there's lots of data to enter which will take time.)

That's it for today, a short and sweet entry into this blog-o-rama.



Posted on Dec. 3, 2006 at 4:23 P.M.

Hello all! I have finally put my new website up for the world to see! I'm still not much for designing the look and feel of websites, but after learning all about Django, I felt like I just had to update my website to use Django.

Under the hood, there is low-level caching being done on both the Digg RSS feed and the Yahoo Flickr feed. There are two RSS feeds available for the site: new blog posts, and new run information. To show the graph under runs, I've used some AJAX to get the running data dynamically and create the graph with javascript. Finally, I've created a custom Django template tag to allow me to post syntax-highlighted code using Pygments.

Example of pygmentized code (the one from this site, actually, that gets my latest digg articles):

def get_digg_rss():
    d = feedparser.parse('http://www.digg.com/rss/floguy/index2.xml')
    dugg_dicts = cache.get('dugg_dicts')
    if dugg_dicts == None:
        print "Had to re-fetch digg links"
        dugg_dicts = []
        for entry in d.entries:
            dugg_dicts.append({'title':entry.title, 'link':entry.link})
        cache.set('dugg_dicts', dugg_dicts, 60*60)
    return dugg_dicts

I hope that you all enjoy the website, and I also hope that you'll begin to frequent it, because I'll be keeping it up-to-date with the goings-on of my professional life.

Search

 

Recent Links

  • git-issues: A distributed issue tracker built-in to Git.
  • I predicted this back in March--can't believe a solution has surfaced so soon. It makes so much sense to build in an issue tracker to a revision control system. Since you're working with the code, might as well track the issues in the same system and take advantage of the extra metadata. This is really cool (and as a bonus, it's written in Python) so I hope to see it really grow and flourish!

  • How I Work Daily
  • Daily blog by Kevin Fricovsky. In addition to having some really great content, he has started to post audio interviews with people from the Django community. This is a site to keep an eye on in the coming days and months.

  • django-arcade
  • Demo site for django-arcade, an open source reusable Django app to add new flash games to any django-powered site. Looks very cool for easily creating game portals. It also comes from my future employer.

  • Facebook Chat and Scalability (with Erlang)
  • Eugene Letuchy talks about how they they took Facebook Chat from no users to 70 million users, with the help of Erlang.

  • Simon Willison: The Implications of OpenID
  • I somehow missed this presentation when it came out, but it's an absolutely fantastic overview and defense of OpenID by Simon Willison. If you are in any way interested in what OpenID is and what it can offer, you owe it to yourself to check out this presentation.

  • StupidXML
  • Probably the simplest XML library that I've seen for Python. Sometimes you just want to generate some stupid XML, and this is the perfect tool for the job.

  • See the rest of my links...

Pownce

Badges

  • django badge
  • apache badge
  • GeoURL
  • XFN Friendly
  • Valid HTML 4.01 Transitional