Show More
@@ -9,6 +9,7 b' import requests' | |||||
9 |
|
9 | |||
10 | from boards import utils, settings |
|
10 | from boards import utils, settings | |
11 | from boards.abstracts.paginator import get_paginator |
|
11 | from boards.abstracts.paginator import get_paginator | |
|
12 | from boards.abstracts.settingsmanager import get_settings_manager | |||
12 | from boards.models import Post, Thread, Ban, Tag, PostImage, Banner |
|
13 | from boards.models import Post, Thread, Ban, Tag, PostImage, Banner | |
13 | from boards.views.base import BaseBoardView |
|
14 | from boards.views.base import BaseBoardView | |
14 | from boards.views.posting_mixin import PostMixin |
|
15 | from boards.views.posting_mixin import PostMixin | |
@@ -30,7 +31,11 b' class FeedView(PostMixin, BaseBoardView)' | |||||
30 | def get(self, request, page=DEFAULT_PAGE): |
|
31 | def get(self, request, page=DEFAULT_PAGE): | |
31 | params = self.get_context_data(request=request) |
|
32 | params = self.get_context_data(request=request) | |
32 |
|
33 | |||
33 | paginator = get_paginator(Post.objects.order_by('-pub_time') |
|
34 | settings_manager = get_settings_manager(request) | |
|
35 | ||||
|
36 | paginator = get_paginator(Post.objects | |||
|
37 | .exclude(threads__tags__in=settings_manager.get_hidden_tags()) | |||
|
38 | .order_by('-pub_time') | |||
34 | .prefetch_related('images', 'thread', 'threads'), 10) |
|
39 | .prefetch_related('images', 'thread', 'threads'), 10) | |
35 | paginator.current_page = int(page) |
|
40 | paginator.current_page = int(page) | |
36 |
|
41 |
General Comments 0
You need to be logged in to leave comments.
Login now