New Comments 10.08.2007

Django’s Free Comments contrib library is pretty decent for something that’s built in: it’s extremely flexible, able to attach comments to practically any object that has an unique id. But at the same time, it’s also extremely limited1. And one big limitation is in the area of comment spam:

Boo comment spam

Comment spam sucks. Hidden amidst the hundreds of spam, there’s a single authentic comment in that image. Sad? Oh yes.

So over the past hour or so, I’ve finally gotten around to building my own comment system2. I haven’t yet used a captcha or anything, hoping instead that some check boxes will do the trick. Why?

Because the system allows “invalid” comments to go through. In other words, in theory, spambots have no way of realizing that a specific checkbox needs to be checked, because even when that box isn’t checked, the form submits “successfully”.

Who knows if that’ll be enough of a deterrent — we’ll see.

Next step is to import all the real comments from the FreeComment database tables.

Edit: And done! Previous FreeComments are now imported, courtesy of a gigantic, ridiculously long insert…select statement.


  1. The other big limitation is email notification. With FreeComments, I have to check in the admin for any new comments. With my new comment system, I automatically get an email every time a new comment is entered.
  2. As a side note, Django’s templatetags are really useful, but also give annoyingly vague errors when something goes wrong. It took me 20 minutes (and a substantial amount of personal stupidity) to figure out that the reason my custom tag wasn’t working was because I was referencing it with {{tag}} rather than {%tag%}. Sigh.