docs: def pagination_data(self, max_number_of_links=7):
          '''Returns a generator of tuples (string, page_number, clickable),
          where `string` is the text of the html link, `page_number` is
          the number of the page the link points to, and `clickable` is
          a boolean indicating whether the link is clickable or not.
          '''
          div, mod = divmod(max_number_of_links, 2)
          if not mod == 1:
              msg = 'Max number of links must be odd, was %r.'
              raise ValueError(msg % max_number_of_links)
  
          midpoint = (max_number_of_links - 1) / 2
          current_page = self.current_page
          last_page = self.last_page
  
          if current_page > last_page:
              raise Http404('invalid page number')
              current_page = last_page
  
          show_link_firstpage = midpoint < current_page
          show_link_previouspage = 1 < current_page
          show_link_lastpage = current_page < (self.last_page - midpoint)
          show_link_nextpage = current_page < last_page
  
          extra_room_previous = midpoint - current_page
          if extra_room_previous < 0:
              extra_room_previous = 0
          if not show_link_firstpage:
              extra_room_previous += 1
          if not show_link_previouspage:
              extra_room_previous += 1
  
          extra_room_subsequent = current_page - last_page + midpoint
          extra_room_subsequent = max([extra_room_subsequent, 0])
          if not show_link_nextpage:
              extra_room_subsequent += 1
          if not show_link_lastpage:
              extra_room_subsequent += 1
  
          if self.current_page == 1:
              yield PageLink(string=1, page_number=1, clickable=False)
          else:
              # The  "first page" link.
              if show_link_firstpage:
                  #[<<] [<] [7] [8] [9] 10 [11] ...'
                  #  ^
                  yield PageLink(string=u"\u00AB", page_number=1, clickable=True)
  
              if show_link_previouspage:
                  # The "previous page" link.
                  #[<<] [<] [7] [8] [9] 10 [11] ...'
                  #      ^
                  yield PageLink(string=u"\u2039",
                                 page_number=self.previous_page,
                                 clickable=True)
  
          # Up to `midpoint + extra_room_subsequent` previous page numbers.
          previous = itertools.islice(self.previous_pages_numbers(),
                                      midpoint + extra_room_subsequent)
          previous = list(previous)[::-1]
  
          for page_number in previous:
              yield PageLink(string=page_number,
                             page_number=page_number, clickable=True)
  
          # The current page, clickable.
          if current_page != 1:
              yield PageLink(string=current_page,
                             page_number=current_page, clickable=False)
  
          # Up to `midpoint + extra_room_previous` subsequent page numbers.
          subsequent_count = midpoint + extra_room_previous
          _subsequent_pages_count = self._subsequent_pages_count
          if _subsequent_pages_count < subsequent_count:
              subsequent_count = _subsequent_pages_count
  
          for page_number in itertools.islice(self.subsequent_pages_numbers(),
                                              subsequent_count):
              yield PageLink(string=page_number,
                             page_number=page_number, clickable=True)
  
          if show_link_nextpage:
              yield PageLink(string=u"\u203A",
                             page_number=current_page + 1,
                             clickable=True)
  
          if show_link_lastpage:
              yield PageLink(string=u"\u00BB",
                             page_number=last_page,
                             clickable=True)