﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33144	get_elided_page_range() method doesn't work properly.	axinterop	nobody	"I found that the page number is not passed to the ''get_elided_page_range'' method and it uses the default value (1) all the time. 

Having, for example, 34 pages, ''get_elided_page_range'' will always return ''1 2 3 4 … 33 34'' range **regardless** of the current page number.

**views.py**
{{{
class TopicListView(ListView):
    model = Topic
    context_object_name = 'topics'
    template_name = 'topics.html'
    paginate_by = 3

    def get_context_data(self, *, object_list=None, **kwargs):
        context = super().get_context_data(**kwargs)
        context['board'] = self.board
        return context

    def get_queryset(self):
        self.board = get_object_or_404(Board, id=self.kwargs.get('board_id'))
        queryset = self.board.topics.order_by('last_updated').\
            annotate(replies=Count('posts') - 1)
        return queryset
}}}



**topics.html**
{{{
...
{% for page_num in paginator.get_elided_page_range %}
    {{ page_num }}
{% endfor %}
...
}}}

"	Bug	closed	Generic views	3.2	Normal	invalid	paginator, pagination, get_elided_page_range, ListView		Unreviewed	0	0	0	0	0	0
