##// END OF EJS Templates
Optimized feed loading, prefetch images and thread
neko259 -
r1167:ffb47cf4 default
parent child Browse files
Show More
@@ -30,7 +30,8 b' class FeedView(PostMixin, BaseBoardView)'
30 def get(self, request, page=DEFAULT_PAGE):
30 def get(self, request, page=DEFAULT_PAGE):
31 params = self.get_context_data(request=request)
31 params = self.get_context_data(request=request)
32
32
33 paginator = get_paginator(Post.objects.order_by('-pub_time'), 10)
33 paginator = get_paginator(Post.objects.order_by('-pub_time')
34 .prefetch_related('images', 'thread', 'threads'), 10)
34 paginator.current_page = int(page)
35 paginator.current_page = int(page)
35
36
36 params[PARAMETER_POSTS] = paginator.page(page).object_list
37 params[PARAMETER_POSTS] = paginator.page(page).object_list
General Comments 0
You need to be logged in to leave comments. Login now