Page navigation bar

Create a Page object (the 3 arguments are: request, list of items, number of items per page) and use its attributes (items, num, np) to create a navigation bar with a link for each page number

<div py:set="page Page(request, directory.file('/web/tables/woodyallen.csv'), 10)">
<p py:sub="for item in page.items: item.quote+'<hr>'">quote</b>
<span py:rep="for n in range(1,">
<span py:rep="if n == page.num">
<b py:sub="n">n</b>
<span py:rep="if n != page.num">
<a href="page.htm" py:attr="'?page=%d'%n" py:sub="n">n</a>

See example page