A single search result ends in a redirect to the page
This commit is contained in:
parent
b30d86a21d
commit
a6277fc1e2
@ -270,6 +270,9 @@ def search(request):
|
|||||||
if sr is None:
|
if sr is None:
|
||||||
django_messages.error(request, _('Invalid search pattern: %s') % repr(search_txt))
|
django_messages.error(request, _('Invalid search pattern: %s') % repr(search_txt))
|
||||||
sr = []
|
sr = []
|
||||||
|
if len(sr) == 1:
|
||||||
|
return HttpResponseRedirect(url_page(sr[0]))
|
||||||
|
else:
|
||||||
pl = page_list([PikiPage.objects.get(rel_path=rel_path) for rel_path in set(sr)])
|
pl = page_list([PikiPage.objects.get(rel_path=rel_path) for rel_path in set(sr)])
|
||||||
#
|
#
|
||||||
context_adaption(
|
context_adaption(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user