'label': author.name,
'url': author.get_absolute_url(),
'img': get_thumbnail(author.photo, '72x72', crop='top').url if author.photo else '',
+ 'slug': author.slug,
+ 'id': author.id,
}
for author in authors[:limit - len(data)]
])
user=user, name__iregex='\m' + prefix).only('name', 'id', 'slug')
data.extend([
{
- 'type': 'set',
+ 'type': 'userlist',
'label': tag.name,
'url': tag.get_absolute_url(),
+ 'slug': tag.slug,
}
for tag in tags[:limit - len(data)]
])
'type': tag.category,
'label': tag.name,
'url': tag.get_absolute_url(),
+ 'slug': tag.slug,
+ 'id': tag.id,
}
for tag in tags[:limit - len(data)]
])
'type': 'collection',
'label': collection.title,
'url': collection.get_absolute_url(),
+ 'slug': collection.slug,
}
for collection in collections[:limit - len(data)]
])
'author': author_str,
'url': b.get_absolute_url(),
'img': get_thumbnail(b.cover_clean, '72x72').url if b.cover_clean else '',
+ 'slug': b.slug,
}
)
if len(data) < limit:
'type': 'info',
'label': info.title,
'url': info.get_absolute_url(),
+ 'slug': info.slug,
}
for info in infos[:limit - len(data)]
])