[Django]-How to make case insensitive queries with Django Models

63👍

Just use iexact:

User.objects.filter(email__iexact='email@email.com')

Case-insensitive exact match. If the value provided for comparison is None, it will be interpreted as an SQL NULL (see isnull for more details).

9👍

Member.objects.filter(email__iexact=email)
👤bakkal

Leave a comment