##// END OF EJS Templates
Trying to optimize the search
neko259 -
r749:f14417a3 default
parent child Browse files
Show More
@@ -27,7 +27,7 b' class BoardSearchView(View):'
27 if form.is_valid():
27 if form.is_valid():
28 query = form.cleaned_data[FORM_QUERY]
28 query = form.cleaned_data[FORM_QUERY]
29 if len(query) >= 3:
29 if len(query) >= 3:
30 results = SearchQuerySet().auto_query(query).order_by('-id')
30 results = SearchQuerySet().auto_query(query).order_by('-id').load_all()
31 paginator = get_paginator(results, 10)
31 paginator = get_paginator(results, 10)
32
32
33 if REQUEST_PAGE in request.GET:
33 if REQUEST_PAGE in request.GET:
@@ -37,4 +37,4 b' class BoardSearchView(View):'
37 context[CONTEXT_PAGE] = paginator.page(page)
37 context[CONTEXT_PAGE] = paginator.page(page)
38 context[CONTEXT_QUERY] = query
38 context[CONTEXT_QUERY] = query
39
39
40 return render(request, TEMPLATE, context) No newline at end of file
40 return render(request, TEMPLATE, context)
General Comments 0
You need to be logged in to leave comments. Login now