It's an interesting feeling open-sourcing an application that you've developed for your own purposes. Will people use it? Will people find major design flaws? Is it just a big waste of time? These were the questions that were going through my mind before open-sourcing django-threadedcomments. Fortunately, my worries were quelled almost instantly as a people reacted quite positively to the application. There was one recurring comment, however, that almost everyone who tried the sample implementation said: those colors are hideous.
Beyond even that though, it seems that people saw the sample implementation and got the impression that django-threadedcomments = that sample implementation. To me, that's an underestimation of the power of the modular django app. I think that James Bennett hits the nail on the head when he says that:
"Rather than a single definitive 'Django blog' application, for example, I think it’s much more likely we’ll see a collection of applications which, taken together, provide all the key functionality..."
It was this sentiment that pervaded nearly all of the design decisions behind django-threadedcomments: it should be flexible, modular, and reusable so that, taken together with other similarly-designed apps, it can provide some compelling functionality at a fraction of the effort. Now we most assuredly didn't achieve all of those design goals fully, but I believe we're headed in at least the right direction with its development.
To prove my point, I decided to create an improved Digg/Reddit comment system clone using Jonathan Buchanan's wonderful django-voting application, alongside django-threadedcomments, and a fair bit of jQuery. Being almost completely new to Javascript, I was pleasantly surprised by how easy it was to not only integrate all of these technologies and use extensive client- and server-side scripting, but also to achieve a compelling commenting system in well under a week of spare time. Oh, and this time there was actually some effort in making the look and feel of the commenting system acceptable! As with the first example, this one is completely open sourced and available in the django-threadedcomments SVN repository.
Without further ado, the Example Digg/Reddit Comment Clone Plus Focus.
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!
All Content

