(
        self,
        current_page,
        num_pages,
        left_current=1,
        right_current=1,
        left_edge=1,
        right_edge=1,
    )
return list(sorted(left_range | mid_range | right_range))
generator used to determine which page numbers should be shown on the Grid pager

        :param left_current: # of pages to add to the left of current page
        :param right_current: # of fpages to add to the right of current page
        :param left_edge: # of pages to add to the left end
        :param right_edge: # of fpages to add to the right end
generator used to determine which page numbers should be shown on the Grid pager
generator used to determine which page numbers should be shown on the Grid pager
def iter_pages(
        self,
        current_page,
        num_pages,
        left_current=1,
        right_current=1,
        left_edge=1,
        right_edge=1,
    ):
        """
        generator used to determine which page numbers should be shown on the Grid pager

        :param left_current: # of pages to add to the left of current page
        :param right_current: # of fpages to add to the right of current page
        :param left_edge: # of pages to add to the left end
        :param right_edge: # of fpages to add to the right end
        """
        left_range = set(range(1, min(2 + left_edge, num_pages + 1)))
        mid_range = set(
            range(
                max(1, current_page - left_current),
                min(current_page + right_current + 1, num_pages + 1),
            )
        )
        right_range = set(range(max(1, num_pages - right_edge), num_pages + 1))
        return list(sorted(left_range | mid_range | right_range))
def iter_pages ( self , current_page , num_pages , left_current = 1 , right_current = 1 , left_edge = 1 , right_edge = 1 , ) : left_range = set ( range ( 1 , min ( 2 + left_edge , num_pages + 1 ) ) ) mid_range = set ( range ( max ( 1 , current_page - left_current ) , min ( current_page + right_current + 1 , num_pages + 1 ) , ) ) right_range = set ( range ( max ( 1 , num_pages - right_edge ) , num_pages + 1 ) ) return list ( sorted ( left_range | mid_range | right_range ) )