(prefix, search_type='')
return relevant_values_list
Get the search data for a particular prefix. For a more targeted list, a specific search type should be provided
Get the search data for a particular prefix. For a more targeted list, a specific search type should be provided
Get the search data for a particular prefix . For a more targeted list a specific search type should be provided
def get_search_data_list(prefix, search_type=''):
        '''Get the search data for a particular prefix. For a more targeted list, a specific search type should be provided'''

        relevant_values_list = []
        values_list = FilterData.get().get_data()
        for i, values in enumerate(values_list):
            # hacky

            if "%s_column" % prefix in values:
                continue

            # filter out provided search_type
            item_search_type = values.get("%s_search_type" % prefix)
            if item_search_type and search_type != item_search_type:
                continue
            # check if this filter is enabled
            enabled = values.get("%s_enabled" % prefix)
            if enabled == None:
                # by default, the filter is enabled
                is_enabled = True
            else:
                is_enabled = (str(enabled) in ['on', 'true'])
            if not is_enabled:
                pass
                #continue

            relevant_values_list.append(values)

        return relevant_values_list
def get_search_data_list ( prefix , search_type = '' ) : relevant_values_list = [ ] values_list = FilterData . get ( ) . get_data ( ) for i , values in enumerate ( values_list ) : # hacky if "%s_column" % prefix in values : continue # filter out provided search_type item_search_type = values . get ( "%s_search_type" % prefix ) if item_search_type and search_type != item_search_type : continue # check if this filter is enabled enabled = values . get ( "%s_enabled" % prefix ) if enabled == None : # by default, the filter is enabled is_enabled = True else : is_enabled = ( str ( enabled ) in [ 'on' , 'true' ] ) if not is_enabled : pass #continue relevant_values_list . append ( values ) return relevant_values_list