﻿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
29589	Add  django.core.paginator.Page.part_page_range() method	BobDu	BobDu	"Class `Pagination` have a attribute `page_range`,
it's very useful when I want to write the other page link in the html.
We only need write in html like 

{{{
<!-- contacts is a instance of Page class -->
{% for p in contacts.paginator.page_range %}
<li>
    <a href=""{% url 'admin_user_index' %}?&page={{ p }}"">
        {{ p }}
    </a>
</li>
{% endfor %}
}}}

But, when the pages is too more, for example 1000, Things are going to get scary.

So, I suggest insert a method `part_page_range()` for class Page.

For example, 
When the `contacts.paginator.num_pages` `=1000`,
and the `contacts.number` `=500`,
I can use the

{{{
contacts.part_page_range(5)
}}}

to acquire a range instance `range(498, 503)`.
I think Django will be more handy after insert this method."	New feature	closed	Core (Other)	dev	Normal	duplicate			Unreviewed	1	0	0	0	0	0
