code: def basic_search(self, pattern):
          
          lookup = None
          for pattern in pattern.split():
              query_part = models.Q()
              for field in SEARCH_FIELDS:
                  query_part |= models.Q(**{'%s__icontains' % field: pattern})
              if lookup is None:
                  lookup = query_part
              else:
                  lookup |= query_part
  
          return self.get_queryset().filter(lookup)
docs: Basic search on entries.