diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2017-05-30 14:37:56 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2017-05-30 14:37:56 +0200 |
commit | 82eeab4b74bbdf9d461a4a586eb3e34b78debb15 (patch) | |
tree | b3d5e3bfbbf23847ff399d12d34f95dbb7770dfc /src/web/views | |
parent | hack (diff) | |
download | newspipe-82eeab4b74bbdf9d461a4a586eb3e34b78debb15.tar.gz newspipe-82eeab4b74bbdf9d461a4a586eb3e34b78debb15.tar.bz2 newspipe-82eeab4b74bbdf9d461a4a586eb3e34b78debb15.zip |
Improved UI for bookmarks. It is now possible to search bookmarks through titles and descriptions.
Diffstat (limited to 'src/web/views')
-rw-r--r-- | src/web/views/bookmark.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/web/views/bookmark.py b/src/web/views/bookmark.py index 8736e1ca..69a094ac 100644 --- a/src/web/views/bookmark.py +++ b/src/web/views/bookmark.py @@ -58,6 +58,11 @@ def list_(per_page, status='all'): tag = request.args.get('tag', None) if tag: filters['tags_proxy__contains'] = tag + query = request.args.get('query', None) + if query: + query = '%' + query + '%' + filters['__or__'] = {'title__ilike': query, 'description__ilike': query} + if current_user.is_authenticated: # query for the bookmarks of the authenticated user |