Map.objects.filter(name__iexact=self.cleaned_data["name"]).count()
thanks
Map.objects.filter(name__iexact=self.cleaned_data["name"]).count()
thanks
Hello, I suspect you are using Django or some kind of ORM.
*name__iexact* means that you are doing a case insensitive match on the field name
check for instance http://docs.djangoproject.com/en/dev/topics/db/queries/ for more documentation on django queries.
I hope this will help you, Jerome Wagner
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 __iexact
to any field name. See the documentation for more on iexact or for list of other similar field lookups.