code: def needs_pagination(self):
          
          if self.objects_per_page == 0:
              return False
          if len(self.items) > self.objects_per_page \
                  or len(self.get_pages[0]) > self.objects_per_page:
              return True
          return False
docs: Calculate needs pagination