diff --git a/backend/backend.py b/backend/backend.py index 3eb8ae7d..0e910ade 100644 --- a/backend/backend.py +++ b/backend/backend.py @@ -85,9 +85,13 @@ def main_page(): sorted_watches = [] for uuid, watch in datastore.data['watching'].items(): if limit_tag != None: - if watch['tag'] == limit_tag: - watch['uuid'] = uuid - sorted_watches.append(watch) + # Support for comma separated list of tags. + for tag_in_watch in watch['tag'].split(','): + tag_in_watch = tag_in_watch.strip() + if tag_in_watch == limit_tag: + watch['uuid'] = uuid + sorted_watches.append(watch) + else: watch['uuid'] = uuid sorted_watches.append(watch) diff --git a/backend/store.py b/backend/store.py index 4130a66a..f33102f5 100644 --- a/backend/store.py +++ b/backend/store.py @@ -69,8 +69,12 @@ class ChangeDetectionStore: def get_all_tags(self): tags=[] for uuid, watch in self.data['watching'].items(): - if not watch['tag'] in tags: - tags.append(watch['tag']) + + # Support for comma separated list of tags. + for tag in watch['tag'].split(','): + tag = tag.strip() + if not tag in tags: + tags.append(tag) return tags diff --git a/backend/templates/edit.html b/backend/templates/edit.html index 54ebaeb4..1effb60b 100644 --- a/backend/templates/edit.html +++ b/backend/templates/edit.html @@ -15,6 +15,7 @@
+ Grouping tags, can be a comma separated list.