joashivanmoodley / django-pagination

Automatically exported from code.google.com/p/django-pagination
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Feature getting page by id of element inside paginated list and possibility to define own name of number page parameter instead of default 'page' #60

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I need 2 features, that wasn't provide by application:
1. Get number of page by id of element inside paginated list
2. Possibility to rename default parameter 'page' to another value for
using it inside template.

I wrote patch, that provide this features transparently by adding 2
optional parameters in autopaginate templatetag:

{% autopaginate object_list paginated_by orphans page_by_id parameter_name %}

Get page by id feature will work only if default page parameter isn't
defined and it makes calculation without transfering all data from
databases, only ids of elements.

Original issue reported on code.google.com by ramu...@gmail.com on 30 Nov 2009 at 7:21

Attachments: