'Return an extra filter to the queryset so that the results are filtered
on the appropriate content type.'

def extra_filters(self, pieces, pos, negate):

    if negate:
        return []
    ContentType = get_model('contenttypes', 'contenttype')
    content_type = ContentType.objects.get_for_model(self.model)
    prefix = '__'.join(pieces[:(pos + 1)])
    return [(('%s__%s' % (prefix, self.content_type_field_name)), content_type)]
