Answer the question
In order to leave comments, you need to log in
How to make search case insensitive in Flask Sqlite?
This code searches case sensitive
ru_riddles = riddles.query.filter(riddles.ruText.contains(q)).all()
ru_riddles = riddles.query.filter(riddles.ruText.like(q)).all()
SELECT * FROM riddles WHERE ruText LIKE "%текст%"
Answer the question
In order to leave comments, you need to log in
I understand you have sqlalchemy, try ilike , but I don't know if it works correctly with sqlite:
ru_riddles = riddles.query.filter(riddles.ruText.ilike(q)).all()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question