How can django sql queries use case insensitive and contains at the same time?
Use:
User.objects.filter(username__icontains='ab')
icontains
is case-insensitive - http://docs.djangoproject.com/en/dev/ref/models/querysets/#std:fieldlookup-icontains