(self, show_more=False)
return count, results
If `show_more` = True, then the result returns a tuple where the first
        value is a boolean of whether more additional pages are still available
        (used by Select 2). Otherwise the first value in the tuple returned
        is the total.
        :param show_more: (optional)
        :return: (int) count or (bool) has_more, (list) results
If `show_more` = True, then the result returns a tuple where the first
        value is a boolean of whether more additional pages are still available
        (used by Select 2). Otherwise the first value in the tuple returned
        is the total.
        :param show_more: (optional)
        :return: (int) count or (bool) has_more, (list) results
If show_more = True then the result returns a tuple where the first value is a boolean of whether more additional pages are still available ( used by Select 2 ) . Otherwise the first value in the tuple returned is the total . : param show_more : ( optional ) : return : ( int ) count or ( bool ) has_more ( list ) results
def get_options(self, show_more=False):
        """
        If `show_more` = True, then the result returns a tuple where the first
        value is a boolean of whether more additional pages are still available
        (used by Select 2). Otherwise the first value in the tuple returned
        is the total.
        :param show_more: (optional)
        :return: (int) count or (bool) has_more, (list) results
        """
        start = self.size * (self.page - 1)
        count, options = paginate_options(
            self.data_sources,
            self.search,
            start,
            self.size
        )
        results = [
            {'id': entry[0], 'text': entry[1]} if len(entry) == 2 else
            {'id': entry[0], 'text': entry[1], 'is_active': entry[2]} for entry
            in options
        ]

        if show_more:
            has_more = (self.page * self.size) < count
            return has_more, results
        return count, results
def get_options ( self , show_more = False ) : start = self . size * ( self . page - 1 ) count , options = paginate_options ( self . data_sources , self . search , start , self . size ) results = [ { 'id' : entry [ 0 ] , 'text' : entry [ 1 ] } if len ( entry ) == 2 else { 'id' : entry [ 0 ] , 'text' : entry [ 1 ] , 'is_active' : entry [ 2 ] } for entry in options ] if show_more : has_more = ( self . page * self . size ) < count return has_more , results return count , results