I am using Django1.6, I am trying to use the QuerySet filter, but it behaves strangely.
Here is my code:
test_listing = Test.objects.filter(site__id=_site_id, show_on_site=True)
Then I try to get a listing based on the text found:
test_listing = test_listing.filter(name__icontains = searched_text)
I use MySQL as a database for my project.
When I search for "foo", it returns an empty list, but when I search for "FOO", it returns a list of objects that have a FOOBAR entry as the name in my test table.
Why is this so strange ...?
source
share