def import_comments(self, forum_id):
        print 'Importing into forum %s' % self.forum_id

        article_ct = ContentType.objects.get_for_model(Article)
        for comment in Comment.objects.filter(content_type=article_ct):
            article = comment.content_object
            thread_obj = self.get_value_from_api('thread_by_identifier', {'identifier': article.id, 'title': article.title, 'forum_api_key': self.forum_api_key}, method='POST')

            thread = thread_obj['thread']
            if thread_obj['created']:
                # set the URL for this thread for good measure
                self.get_value_from_api('update_thread', {
                    'forum_api_key': self.forum_api_key,
                    'thread_id': thread['id'],
                    'title': article.title,
                    'url': 'http://%s%s' % (Site.objects.get_current().domain, article.get_absolute_url()),
                }, method='POST')
                print 'Created new thread for %s' % article.title

            # create the comment on disqus
            comment_obj = self.get_value_from_api('create_post', {
                'thread_id': thread['id'],
                'message': comment.comment,
                'author_name': comment.user_name,
                'author_email': comment.user_email,
                'forum_api_key': self.forum_api_key,
                'created_at': comment.submit_date.strftime('%Y-%m-%dT%H:%M'),
                'ip_address': comment.ip_address,
                'author_url': comment.user_url,
                'state': self.get_state(comment)
            }, method='POST')

            print (article, comment.user_name, comment.submit_date) % 'Imported comment for %s by %s on %s'
dataset/ETHPy150Open codekoala/django-articles/articles/management/commands/convert_comments_to_disqus.py/Command.import_comments/swapped operands of `%`