﻿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
720	Added methods to ObjectPaginator for getting the numbers of first and last object on page	m@…	Adrian Holovaty	"Hi,

I added two convenience methods to django/core/paginator.py for getting the numbers of the first and last object on the current page, relative to the total number of objects found (paginator.hits):

* first_on_page(page_number)
* last_on_page(page_number)

The purpose of having these methods would be to make it easy for the view author to make these values available to the template author who would commonly need to output stuff like:

''Now showing x through y of z matching records''

I have tried to implement these methods in the style of the other ""public"" methods of the ObjectPaginator class, so that they take the page number as their only argument when called externally. I am still fairly new to Python and to submitting patches to Django, so please feel free to rename/correct at will.

If these methods are incorporated into the default distribution, I think the generic views should be modified accordingly to provide these values. I would be happy to make those changes, if needed.

Thanks!

/Morten"	enhancement	closed	Core (Other)		minor	fixed			Unreviewed	0	0	0	0	0	0
