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

Two autopaginate tags, paginator object gets confused #18

@mjtorn

Description

@mjtorn

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions