blot.writers.paginatedwriter

class blot.writers.paginatedwriter.PageHelper(items, size)

Bases: object

Utility class that providers an iterator that returns slices of the underlying list.

class blot.writers.paginatedwriter.PaginatedWriter(assets, variable_name, template, path, size=10)

Bases: object

Writer that paginates the underlying assets and renders a template for each page.

PaginatedWriter takes divides its assets into groups of the specified size and renders the specified template for each group. The global context variable will point to the URL of the first page.

The context when rendering each of the pages contains a number of variables for navigating between the pages.

pathfor(index)

generate the target path for a given page

render(original_context)
target(context)