Mercurial > piecrust2
comparison piecrust/data/paginator.py @ 242:f130365568ff
internal: Code reorganization to put less stuff in `sources.base`.
Interfaces that sources can implement are in `sources.interfaces`. The default
page source is in `sources.default`. The `SimplePageSource` is gone since most
subclasses only wanted to do *some* stuff the same, but *lots* of stuff
slightly different. I may have to revisit the code to extract exactly the code
that's in common.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 18 Feb 2015 18:35:03 -0800 |
parents | dc8a6ff88f37 |
children | 8c0c53a315ae |
comparison
equal
deleted
inserted
replaced
241:85a6c7ba5e3b | 242:f130365568ff |
---|---|
1 import math | 1 import math |
2 import logging | 2 import logging |
3 from werkzeug.utils import cached_property | 3 from werkzeug.utils import cached_property |
4 from piecrust.data.base import IPaginationSource | |
5 from piecrust.data.filters import PaginationFilter | 4 from piecrust.data.filters import PaginationFilter |
6 from piecrust.data.iterators import PageIterator | 5 from piecrust.data.iterators import PageIterator |
6 from piecrust.sources.interfaces import IPaginationSource | |
7 | 7 |
8 | 8 |
9 logger = logging.getLogger(__name__) | 9 logger = logging.getLogger(__name__) |
10 | 10 |
11 | 11 |