Show More
@@ -43,6 +43,7 b' class NotificationView(BaseBoardView, Pa' | |||
|
43 | 43 | paginator = get_paginator(posts, RESULTS_PER_PAGE, |
|
44 | 44 | link=reverse('notifications'), |
|
45 | 45 | params=request.GET.dict()) |
|
46 | paginator.current_page = page | |
|
46 | 47 | |
|
47 | 48 | params[PARAM_PAGE] = paginator.page(page) |
|
48 | 49 | params[PARAM_USERNAMES] = notification_usernames |
@@ -16,7 +16,6 b" FORM_QUERY = 'query'" | |||
|
16 | 16 | |
|
17 | 17 | CONTEXT_QUERY = 'query' |
|
18 | 18 | CONTEXT_FORM = 'form' |
|
19 | CONTEXT_PAGE = 'page' | |
|
20 | 19 | CONTEXT_TAGS = 'tags' |
|
21 | 20 | |
|
22 | 21 | REQUEST_PAGE = 'page' |
@@ -36,6 +35,8 b' class BoardSearchView(View, PaginatedMix' | |||
|
36 | 35 | if form.is_valid(): |
|
37 | 36 | query = form.cleaned_data[FORM_QUERY] |
|
38 | 37 | if len(query) >= MIN_QUERY_LENGTH: |
|
38 | page = int(request.GET.get(REQUEST_PAGE, '1')) | |
|
39 | ||
|
39 | 40 | results = Post.objects.filter(Q(text__icontains=query) |
|
40 | 41 | | Q(title__icontains=query) | Q(opening=True, |
|
41 | 42 | thread__tags__aliases__name__icontains=query) |
@@ -43,8 +44,7 b' class BoardSearchView(View, PaginatedMix' | |||
|
43 | 44 | paginator = get_paginator(results, RESULTS_PER_PAGE, |
|
44 | 45 | link=reverse('search'), |
|
45 | 46 | params=request.GET.dict()) |
|
46 | ||
|
47 | page = int(request.GET.get(REQUEST_PAGE, '1')) | |
|
47 | paginator.current_page = page | |
|
48 | 48 | |
|
49 | 49 | params[CONTEXT_QUERY] = query |
|
50 | 50 | params.update(self.get_page_context(paginator, page)) |
General Comments 0
You need to be logged in to leave comments.
Login now