def auto_register_search_models():
    """Auto register all search models"""
    for config in models_config.get_all_configs():
        if config.disable_search_index:
            continue

        search.register(
            config.model.objects.get_queryset(),
            ModelSearchAdapter,
            fields=config.search_fields,
            exclude=config.search_exclude_fields,
        )
def auto_register_search_models ( ) : for config in models_config . get_all_configs ( ) : if config . disable_search_index : continue search . register ( config . model . objects . get_queryset ( ) , ModelSearchAdapter , fields = config . search_fields , exclude = config . search_exclude_fields , )
Auto register all search models