Django Model - Case-insensitive Query / Filtering

Solution 1:

I solved it like this:

MyClass.objects.filter(name__iexact=my_parameter)

There is even a way to use it for substring search:

MyClass.objects.filter(name__icontains=my_parameter)

There's a link to the documentation.