search any part of string instead of only the beginning

Issue #50 resolved
Davy Jacops (bitbucket@swingit.be) created an issue

Search box only searches start of string and not within the string itself.

In the code I noticed that for searching, "istartswith" is used and not "icontains". Is there a particular reason for this? (SQLITE limitation?)

Replacing this in line #177 & #183 indeed solves this.

PS: Great package!

Comments (1)

  1. Maciej Wisniowski repo owner

    In 1.17.0 there is a new method added to the view get_filter_method that can be overridden to switch from istartswith to icontains, eg.:

    def get_filter_method(self):
        return self.FILTER_ICONTAINS
    
  2. Log in to comment