fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
disable crawling for catalogue pages with multiple tags
[wolnelektury.git]
/
src
/
search
/
views.py
diff --git
a/src/search/views.py
b/src/search/views.py
index
64382e2
..
7e512be
100644
(file)
--- a/
src/search/views.py
+++ b/
src/search/views.py
@@
-75,7
+75,7
@@
def hint(request):
limit = 20
authors = Tag.objects.filter(
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,
data = [
{
'label': author.name,
@@
-87,7
+87,8
@@
def hint(request):
if len(data) < limit:
data += [
{
if len(data) < limit:
data += [
{
- 'label': '<cite>%s</cite>, %s' % (b.title, b.author_unicode()),
+ 'label': b.title,
+ 'author': b.author_unicode(),
'id': b.id,
'url': b.get_absolute_url()
}
'id': b.id,
'url': b.get_absolute_url()
}