I have been going crazy trying to solve this. Any direction is appreciated .
I have the following sql query :
sql = "SELECT * FROM hotel_hotel h WHERE name ILIKE '%raffles%'"
I am trying to do :
Hotel.objects.raw(sql)
The % in "%raffles%"
here is causing problems here. I am getting this error :
TypeError: not enough arguments for format string
This doesn't happen when I do a ILIKE 'raffles'
. Any workarounds for this ?