diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2017-05-23 15:31:07 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2017-05-23 15:31:07 +0200 |
commit | b02a3c469e238892a1c13d32c1e208d35e7885ce (patch) | |
tree | 814abd1cf5e06b139c5978ace289ad2ad20d2c9c /src/web/controllers/tag.py | |
parent | Removed debug print (diff) | |
download | newspipe-b02a3c469e238892a1c13d32c1e208d35e7885ce.tar.gz newspipe-b02a3c469e238892a1c13d32c1e208d35e7885ce.tar.bz2 newspipe-b02a3c469e238892a1c13d32c1e208d35e7885ce.zip |
Update tags of bookmarks.
Diffstat (limited to 'src/web/controllers/tag.py')
-rw-r--r-- | src/web/controllers/tag.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/web/controllers/tag.py b/src/web/controllers/tag.py new file mode 100644 index 00000000..a40387c9 --- /dev/null +++ b/src/web/controllers/tag.py @@ -0,0 +1,19 @@ +import logging +import itertools +from datetime import datetime, timedelta + +from bootstrap import db +from .abstract import AbstractController +from web.models.tag import BookmarkTag + +logger = logging.getLogger(__name__) + + +class BookmarkTagController(AbstractController): + _db_cls = BookmarkTag + + def count_by_href(self, **filters): + return self._count_by(BookmarkTag.text, filters) + + def update(self, filters, attrs): + return super().update(filters, attrs) |