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!
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.
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.
All Content

