def get_context_data(self, **kwargs): context_data = super(TagPostsView, self).get_context_data(**kwargs) context_data['tag'] = self.tag context_data['page_range'] = GenericPaginator( self.get_queryset(), self.paginate_by, self.request.GET.get('page')).get_page_range() return context_data
def get_context_data(self, **kwargs): context_data = super(HomepageView, self).get_context_data(**kwargs) context_data['page_range'] = GenericPaginator( self.queryset, self.paginate_by, self.request.GET.get('page') ).get_page_range() return context_data