What is the equivalent of this SQL statement in django?
SELECT * FROM table_name WHERE string LIKE pattern;
How do I implement this in djan
contains and icontains mentioned by falsetru make queries like SELECT ... WHERE headline LIKE '%pattern%
Along with them, you might need these ones with similar behavior: startswith, istartswith, endswith, iendswith
making
SELECT ... WHERE headline LIKE 'pattern%
or
SELECT ... WHERE headline LIKE '%pattern