@register.simple_tag
def comments(object):
    return Comment.objects.filter(
        object_id=object.pk,
        content_type=ContentType.objects.get_for_model(object)
    )
Make sure we don't index redirects
dataset/ETHPy150Open pinax/pinax-comments/pinax/comments/templatetags/pinax_comments_tags.py/comments--crossover with--dataset/ETHPy150Open mozilla/kitsune/kitsune/wiki/tests/test_es.py/DocumentUpdateTests.test_wiki_redirects