search with string with symbols
I used icontains for filtering data which equivalents to 'LIKE'.
But it won't trigger filter for strings with other ASCII characters eg / , ' , & , etc.
Here's a sample code
Chartofaccount.objects.all().filter(title__icontains=search).filter(isdeleted=0).order_by('-pk')
which works perfectly well when searching. But when I search for words like
cats & dogs
It would not return any results, same with other stated characters.
链接地址: http://www.djcxy.com/p/38732.html上一篇: 在Windows上的Ruby网络问题
下一篇: 用符号搜索字符串