﻿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
22529	Paginator: Get page number using object unique attributes	kasturisurya@…	nobody	"Lets consider the situation:


{{{
obj_list = MyModel.objects.filter(is_displayed=True)
pages = Paginator(obj_list, 1)

current_page = pages.page(self.pk)

}}}

If for instance `obj_list` does not contain all objects, the page number of `self.pk` will not be the value of `self.pk` in which case the paginator raises `Empty Page` exception.

This can be quite elegantly handled if `page` method can do or something similar to below

{{{

current_page = pages.page(pk=self.pk)

}}}

"	New feature	closed	Core (Other)	1.6	Normal	needsinfo			Unreviewed	0	0	0	0	0	0
