Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InfinitePagination/FinitePagination howto #4

Open
rizumu opened this issue Apr 21, 2010 · 1 comment
Open

InfinitePagination/FinitePagination howto #4

rizumu opened this issue Apr 21, 2010 · 1 comment

Comments

@rizumu
Copy link

rizumu commented Apr 21, 2010

I'd really like to use the InfinitePagination feature from pagination.py. I've tried everything I can think of to no avail. Can anyone explain how to set this up? In addition, usage instructions in the docs would be most helpful.

I kept pagination setup the default way, using autopaginate and paginate:

{% autopaginate object_list 12 %}
.....
{% paginate %}

Also just to verify, I changed pagination_tags.py (line 99) to use InfinitePaginator, since it wasn't clear if it was actually being retrieved from my view's response context or not.

paginator = InfinitePaginator(value, paginate_by, self.orphans)

Thanks in advance.

@rizumu
Copy link
Author

rizumu commented Apr 26, 2010

I came up with a solution in my fork/branch. Now a 'style' can be selected for the paginator, default is 'standard'. It also is relatively easy now for someone to use a custom 'style' with their project, by following this example.

working examples:

{% autopaginate object_list %}
{% autopaginate object_list 12 standard %}
{% autopaginate object_list finite %}
{% autopaginate object_list 12 infinite %}
{% autopaginate object_list 12 backwards %}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant