Display tags in bookmark list

This commit is contained in:
Sascha Ißbrücker
2019-06-30 08:24:21 +02:00
parent 4a16e4d64c
commit accc360ae5
7 changed files with 65 additions and 11 deletions

View File

@@ -17,11 +17,10 @@ class Concat(Aggregate):
def query_bookmarks(user: User, query_string: str):
# Add aggregated tag info to bookmark instances
query_set = Bookmark.objects \
.annotate(tags_count=Count('tags')) \
.annotate(tags_string=Concat('tags__name'))
.annotate(tag_count=Count('tags'),
tag_string=Concat('tags__name'))
# Sanitize query params
if not query_string: