mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-07 10:58:25 +02:00
Display selected tags in tag cloud (#307)
* Add links to remove tags from current query * Display selected tags in tag cloud * Add tag cloud tests * Fix tag cloud in archive * Add tests for bookmark views * Expose parse query string * Improve tag cloud tests * Cleanup * Fix rebase issues * Ignore casing when removing tags from query Co-authored-by: Jon Hauris <jonp@hauris.org>
This commit is contained in:
@@ -47,7 +47,7 @@ def _base_bookmarks_query(user: Optional[User], query_string: str) -> QuerySet:
|
||||
query_set = query_set.filter(owner=user)
|
||||
|
||||
# Split query into search terms and tags
|
||||
query = _parse_query_string(query_string)
|
||||
query = parse_query_string(query_string)
|
||||
|
||||
# Filter for search terms and tags
|
||||
for term in query['search_terms']:
|
||||
@@ -117,7 +117,7 @@ def get_user_tags(user: User):
|
||||
return Tag.objects.filter(owner=user).all()
|
||||
|
||||
|
||||
def _parse_query_string(query_string):
|
||||
def parse_query_string(query_string):
|
||||
# Sanitize query params
|
||||
if not query_string:
|
||||
query_string = ''
|
||||
|
Reference in New Issue
Block a user