def comments(context, obj):
    """ Render comments for obj. """
    content_type = ContentType.objects.get_for_model(obj.__class__)
    comment_list = LogEntry.objects.filter(
        content_type=content_type,
        object_id=obj.pk,
        action_flag=COMMENT
    )
    return {
        'obj': obj,
        'comment_list': comment_list,
        'is_admin': context['is_admin'],
    }