'Validate that list_filter is a sequence of one of three options:
1: \'field\' - a basic field filter, possibly w/ relationships (eg, \'field__rel\')
2: (\'field\', SomeFieldListFilter) - a field-based list filter class
3: SomeListFilter - a non-field list filter class'

def validate_list_filter(self, cls, model):

    from django.contrib.admin import ListFilter, FieldListFilter
    if hasattr(cls, 'list_filter'):
        check_isseq(cls, 'list_filter', cls.list_filter)
        for (idx, item) in enumerate(cls.list_filter):
            if (callable(item) and (not isinstance(item, models.Field))):
                if (not issubclass(item, ListFilter)):
                    raise ImproperlyConfigured(("'%s.list_filter[%d]'    is    '%s'    which    is    not    a    descendant    of    ListFilter." % (cls.__name__, idx, item.__name__)))
                if issubclass(item, FieldListFilter):
                    raise ImproperlyConfigured(("'%s.list_filter[%d]'    is    '%s'    which    is    of    type    FieldListFilter    but    is    not    associated    with    a    field    name." % (cls.__name__, idx, item.__name__)))
            else:
                if isinstance(item, (tuple, list)):
                    (field, list_filter_class) = item
                    if (not issubclass(list_filter_class, FieldListFilter)):
                        raise ImproperlyConfigured(("'%s.list_filter[%d][1]'    is    '%s'    which    is    not    of    type    FieldListFilter." % (cls.__name__, idx, list_filter_class.__name__)))
                else:
                    field = item
                try:
                    get_fields_from_path(model, field)
                except (NotRelationField, FieldDoesNotExist):
                    raise ImproperlyConfigured(("'%s.list_filter[%d]'    refers    to    '%s'    which    does    not    refer    to    a    Field." % (cls.__name__, idx, field)))
