code: def get_search(self):
          
          old_search = self.get_session_value('search', '')
          search = self.get_and_save_value('search', '')
          if old_search != search:
              self.page = 1
              self.get_session_value('page', self.page)
          return search
docs: Get current search or search from session, reset page if search is changed