From 5936c6aba13e682a0386564bf5798c19dae35819 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 23 May 2017 21:36:12 +0200 Subject: tags are lowercase --- src/web/controllers/tag.py | 4 ++++ src/web/templates/bookmarks.html | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src/web') diff --git a/src/web/controllers/tag.py b/src/web/controllers/tag.py index a40387c9..203e9a7e 100644 --- a/src/web/controllers/tag.py +++ b/src/web/controllers/tag.py @@ -15,5 +15,9 @@ class BookmarkTagController(AbstractController): def count_by_href(self, **filters): return self._count_by(BookmarkTag.text, filters) + def create(self, **attrs): + attrs['text'] = attrs['text'].lower() + return super().create(**attrs) + def update(self, filters, attrs): return super().update(filters, attrs) diff --git a/src/web/templates/bookmarks.html b/src/web/templates/bookmarks.html index 40a7e7b9..6b727a16 100644 --- a/src/web/templates/bookmarks.html +++ b/src/web/templates/bookmarks.html @@ -10,8 +10,8 @@ {{ bookmark.title }}

- {{ bookmark.description }}
- {{ ", ".join(bookmark.tags_proxy) }} +

{{ bookmark.description }}
+ {{ " ".join(bookmark.tags_proxy) }} edit

-- cgit