Mercurial > piecrust2
comparison piecrust/data/linker.py @ 853:f070a4fc033c
core: Continue PieCrust3 refactor, simplify pages.
The asset pipeline is still the only function pipeline at this point.
* No more `QualifiedPage`, and several other pieces of code deleted.
* Data providers are simpler and more focused. For instance, the page iterator
doesn't try to support other types of items.
* Route parameters are proper known source metadata to remove the confusion
between the two.
* Make the baker and pipeline more correctly manage records and record
histories.
* Add support for record collapsing and deleting stale outputs in the asset
pipeline.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 21 May 2017 00:06:59 -0700 |
parents | 4850f8c21b6e |
children | 08e02c2a2a1a |
comparison
equal
deleted
inserted
replaced
852:4850f8c21b6e | 853:f070a4fc033c |
---|---|
1 import logging | 1 import logging |
2 import collections | 2 import collections |
3 from piecrust.data.iterators import PageIterator | |
4 from piecrust.data.pagedata import LazyPageConfigLoaderHasNoValue | 3 from piecrust.data.pagedata import LazyPageConfigLoaderHasNoValue |
5 from piecrust.data.paginationdata import PaginationData | 4 from piecrust.data.paginationdata import PaginationData |
6 from piecrust.sources.interfaces import IPaginationSource | 5 from piecrust.dataproviders.page_iterator import PageIterator |
7 | 6 |
8 | 7 |
9 logger = logging.getLogger(__name__) | 8 logger = logging.getLogger(__name__) |
10 | 9 |
11 | 10 |
12 class PageLinkerData(object): | 11 class PageLinkerData(object): |
13 """ Entry template data to get access to related pages from a given | 12 """ Entry template data to get access to related pages from a given |
14 root page. | 13 root page. |
15 """ | 14 """ |
16 debug_render = ['parent', 'ancestors', 'siblings', 'children', 'root', | 15 debug_render = ['parent', 'ancestors', 'siblings', 'children', 'root', |
17 'forpath'] | 16 'forpath'] |
18 debug_render_invoke = ['parent', 'ancestors', 'siblings', 'children', | 17 debug_render_invoke = ['parent', 'ancestors', 'siblings', 'children', |
19 'root'] | 18 'root'] |