'Validate that list_select_related is a boolean, a list or a tuple.'

def validate_list_select_related(self, cls, model):

    list_select_related = getattr(cls, 'list_select_related', None)
    if list_select_related:
        types = (bool, tuple, list)
        if (not isinstance(list_select_related, types)):
            raise ImproperlyConfigured(("'%s.list_select_related'    should    be    either    a    bool,    a    tuple    or    a    list" % cls.__name__))
