name_iexact keyword is a parameter we can pass to filter function in django.model. Can someone please help me understand what it does?
Map.objects.filter(name__iexact=self.cleaned_data["name"]).count()
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s a case insensitive match. It will retrive database records with “name” field matching
self.cleaned_data["name"], while the case doesn’t necessarily have to match.You can construct those lookups appending
__iexactto any field name. See the documentation for more on iexact or for list of other similar field lookups.