Working with forms

You have a model named Info that contains a field called email. You now want to perform a case-insensitive exact match for the email sample@gmail.com.

Which of the following lines of code will help you achieve this?

Options
  1. Info.objects.filter( email__icontains=’sample@gmail.com’)
  2. Info.objects.filter( email__exact=’sample@gmail.com’)
  3. Info.objects.filter( email__iexact=’sample@gmail.com’)
  4. Info.objects.filter( email__matches=’sample@gmail.com’)
Previous PostNext Post

Related Posts

Close Bitnami banner
Bitnami