X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/38f324dec64ba8adffcc795095023557b8a7a39c..8139f82c719f4a041b18fd445026b8cf78aca4a6:/apps/search/views.py diff --git a/apps/search/views.py b/apps/search/views.py index de2337f8d..527ca8224 100644 --- a/apps/search/views.py +++ b/apps/search/views.py @@ -74,11 +74,14 @@ def hint(request): tags = s.hint_tags(prefix, pdcounter=True) books = s.hint_books(prefix) - # TODO DODAC TU HINTY + def category_name(c): + if c.startswith('pd_'): + c=c[len('pd_'):] + return _(c) return JSONResponse( [{'label': t.name, - 'category': _(t.category), + 'category': category_name(t.category), 'id': t.id, 'url': t.get_absolute_url()} for t in tags] + \