X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/1801c65004af14a8ed50d60e47d75a415753bbf7..d850c26d30dc10b20278e537198e698b84c64e7b:/src/search/views.py?ds=inline diff --git a/src/search/views.py b/src/search/views.py index 64382e24b..7e512be14 100644 --- a/src/search/views.py +++ b/src/search/views.py @@ -75,7 +75,7 @@ def hint(request): limit = 20 authors = Tag.objects.filter( - category='author', name__iregex='\m' + prefix).only('name', 'id', 'slug', 'category') + category='author', name_pl__iregex='\m' + prefix).only('name', 'id', 'slug', 'category') data = [ { 'label': author.name, @@ -87,7 +87,8 @@ def hint(request): if len(data) < limit: data += [ { - 'label': '%s, %s' % (b.title, b.author_unicode()), + 'label': b.title, + 'author': b.author_unicode(), 'id': b.id, 'url': b.get_absolute_url() }