X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/c34d6e5cea353a47408db1f7e78574b4f1e9c7e7..87b22d351ce199326613811ad544e24e0fa53d28:/src/api/handlers.py?ds=sidebyside diff --git a/src/api/handlers.py b/src/api/handlers.py index 159e4f235..a1e9f6a23 100644 --- a/src/api/handlers.py +++ b/src/api/handlers.py @@ -523,6 +523,13 @@ class TagsHandler(BaseHandler, TagDetails): tags = Tag.objects.filter(category=category_sng).exclude(items=None).order_by('slug') + book_only = request.GET.get('book_only') == 'true' + picture_only = request.GET.get('picture_only') == 'true' + if book_only: + tags = tags.filter(for_books=True) + if picture_only: + tags = tags.filter(for_pictures=True) + if after: tags = tags.filter(slug__gt=after) if before: