Migrating django.contrib.comments to Disqus

As of today I am using Disqus for comments on this site. This meant that I had to migrate the old comments (which used django.contrib.comments) to Disqus. Here’s a short description of how I did this.

Obviously I’m not the first one doing this. As a matter of fact, the article Bye-bye django.comments, hello Disqus by Daniel Roseman provided a very good tip: use django-disqus. I just did not use the disqus-export command.

Here’s what I did:

  • I installed the app as described in the instructions.
  • I added the required template tags to my templates and removed the old code to show the comments and the comment form.
  • To migrate the old comments I created an additional feed to export the comments as WXR.
  • In Disqus I imported the XML from the feed as a generic WXR.

It was a smooth ride (it just took a little over 24 hours for the import to actually finish) and one less thing to do when I move to a static blog based on Acrylamid.