##// END OF EJS Templates
Search OPs by the tag name
neko259 -
r1877:fdc4df62 default
parent child Browse files
Show More
@@ -33,8 +33,9 b' class BoardSearchView(View):'
33 if form.is_valid():
33 if form.is_valid():
34 query = form.cleaned_data[FORM_QUERY]
34 query = form.cleaned_data[FORM_QUERY]
35 if len(query) >= MIN_QUERY_LENGTH:
35 if len(query) >= MIN_QUERY_LENGTH:
36 results = Post.objects.filter(Q(text__icontains=query) |
36 results = Post.objects.filter(Q(text__icontains=query)
37 Q(title__icontains=query)).order_by('-id')
37 | Q(title__icontains=query) | Q(opening=True,
38 thread__tags__aliases__name__icontains=query)).order_by('-id').distinct()
38 paginator = get_paginator(results, RESULTS_PER_PAGE)
39 paginator = get_paginator(results, RESULTS_PER_PAGE)
39
40
40 page = int(request.GET.get(REQUEST_PAGE, '1'))
41 page = int(request.GET.get(REQUEST_PAGE, '1'))
General Comments 0
You need to be logged in to leave comments. Login now