Mercurial > piecrust2
diff piecrust/dataproviders/pageiterator.py @ 856:9bb22bbe093c
refactor: Make the blog archives functional again.
The blog archives are using the same pattern as the taxonomy support.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 06 Jun 2017 01:23:25 -0700 |
parents | 08e02c2a2a1a |
children | 757fba54bfd3 |
line wrap: on
line diff
--- a/piecrust/dataproviders/pageiterator.py Tue Jun 06 00:26:21 2017 -0700 +++ b/piecrust/dataproviders/pageiterator.py Tue Jun 06 01:23:25 2017 -0700 @@ -190,6 +190,13 @@ self._it = it_class(self._it, *args, **kwargs) return self + def _wrapAsSort(self, sort_it_class, *args, **kwargs): + self._ensureUnlocked() + self._ensureUnloaded() + self._it = sort_it_class(self._it, *args, **kwargs) + self._has_sorter = True + return self + def _lockIterator(self): self._ensureUnlocked() self._locked = True