Jul-19-2020, 06:44 PM
Hello Coders,
I have almost solved with my little search bar, just I cannot manage to look for the word with case insensitive, if I write parmesan it finds it, all work normally, if I write ParMeSan it doesn't. Any Idea? I'm reading the documentation but cannot manage to do like it's written there, thank you!
I have almost solved with my little search bar, just I cannot manage to look for the word with case insensitive, if I write parmesan it finds it, all work normally, if I write ParMeSan it doesn't. Any Idea? I'm reading the documentation but cannot manage to do like it's written there, thank you!
@app.route('/search', methods=["POST"]) def search(): if request.method == "POST": data = request.form.to_dict() keyword = str(data['mysearch']) query={"ingredients": { "$regex": keyword }} return render_template("search.html", recipes=mongo.db.recipes.find(query))