def for_model(self, model):
        ct = ContentType.objects.get_for_model(model)
        qs = self.get_query_set().filter(content_type=ct)
        if isinstance(model, models.Model):
            qs = qs.filter(object_pk=force_unicode(model._get_pk_val()))
        return qs
QuerySet for all comments for a particular model (either an instance or
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/django/contrib/comments/managers.py/CommentManager.for_model