Mercurial > piecrust2
comparison piecrust/sources/mixins.py @ 260:07b4b8484c0a
sources: Use `posts_*` and `items_*` settings more appropriately.
The `items_*` settings are the generic ones, and the `posts_*` are only used
with the default content model.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 23 Feb 2015 21:19:20 -0800 |
parents | f130365568ff |
children | 8c0c53a315ae |
comparison
equal
deleted
inserted
replaced
259:adb066ffb363 | 260:07b4b8484c0a |
---|---|
64 def getTailIterator(self, it): | 64 def getTailIterator(self, it): |
65 return PaginationDataBuilderIterator(it) | 65 return PaginationDataBuilderIterator(it) |
66 | 66 |
67 def getPaginationFilter(self, page): | 67 def getPaginationFilter(self, page): |
68 conf = (page.config.get('items_filters') or | 68 conf = (page.config.get('items_filters') or |
69 page.app.config.get('site/items_filters')) | 69 self.config.get('items_filters')) |
70 if conf == 'none' or conf == 'nil' or conf == '': | 70 if conf == 'none' or conf == 'nil' or conf == '': |
71 conf = None | 71 conf = None |
72 if conf is not None: | 72 if conf is not None: |
73 f = PaginationFilter() | 73 f = PaginationFilter() |
74 f.addClausesFromConfig(conf) | 74 f.addClausesFromConfig(conf) |