Q:

Use "contains" and "iexact" at the same query in DJANGO

How can I use contains and iexact Field lookups at the same query in Django?
Like that ..
casas = Casa.objects.filter(nome_fantasia__contains__iexact='green')

A:

If you need case-insensitive contains, use icontains:
casas = Casa.objects.filter(nome_fantasia__icontains = 'green')

Which is converted to
... WHERE nome_fantasia ILIKE '%green%'

in SQL.

A:

Honestly, you don't need to. The two resultsets overlap. If you were intending AND then just use the most restrictive: __iexact. if you want OR use __contains
Just to answer your question you could do something like below (note this is an AND)
casas = Casa.objects.filter(nome_fantasia__contains='green', nome_fantasia__iexact='green')

