Skip to content
This repository was archived by the owner on Jun 5, 2018. It is now read-only.

Two autopaginate tags, paginator object gets confused #18

Open
mjtorn opened this issue Jun 26, 2013 · 0 comments
Open

Two autopaginate tags, paginator object gets confused #18

mjtorn opened this issue Jun 26, 2013 · 0 comments

Comments

@mjtorn
Copy link

mjtorn commented Jun 26, 2013

Hope I get this described right, but we have a situation where we need two different
{% autopaginate foo %} tags. They're in different blocks (of template) so Django can't
pass the result from one block to another and that's why we do it like we do.

The first time around everything's nice, num_pages is eg. 8. The second time it's 1.

Iterating over paginator.object_list (edit: page_obj.object_list of course) doesn't seem
broken, but it's as if all the numeric states get reset.

The second autopaginate is inside a script tag, so I tried /* {% paginate %} */ with
no effect.

There is a paginator object in the context at that time, so is there some magic
that destroys its state or whatever?

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

No branches or pull requests

1 participant