Tags: flask flask-sqlalchemy database


Kevin Foong on

I did a simple search on my blog with Flask-SQLalchemy. It's not very sophisticated. I used "like" to find any occurrence of the search string in any post. posts = Post.query.filter(and_(Post.current==True), (or_(Post.post.like('%'+search_str+'%'), Post.heading.like('%'+search_str+'%')))).all() You can see the full source code here: https://github.com/Kevinf7/blog/blob/master/app/search/routes.py

Dev Elie on

Hello,Thanks alot. i was stuck on implementing an image upload module for images from tinymce,your solution saw me through. Do you have any on text search ?For instance,a blog search implementation

Leave a Comment

Email is optional