Mercurial > piecrust2
diff piecrust/data/provider.py @ 114:371a6c879ab9
When possible, try and batch-load pages so we only lock once.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 19 Oct 2014 00:33:28 -0700 |
parents | 923699e816d0 |
children | f130365568ff |
line wrap: on
line diff
--- a/piecrust/data/provider.py Sun Oct 19 00:30:44 2014 -0700 +++ b/piecrust/data/provider.py Sun Oct 19 00:33:28 2014 -0700 @@ -117,8 +117,7 @@ return self._yearly self._yearly = [] - for fac in self._source.getPageFactories(): - post = fac.buildPage() + for post in self._source.getPages(): year = post.datetime.strftime('%Y') posts_this_year = next( @@ -142,8 +141,7 @@ return self._monthly self._monthly = [] - for fac in self._source.getPageFactories(): - post = fac.buildPage() + for post in self._source.getPages(): month = post.datetime.strftime('%B %Y') posts_this_month = next( @@ -168,8 +166,7 @@ return self._taxonomies[tax_name] posts_by_tax_value = {} - for fac in self._source.getPageFactories(): - post = fac.buildPage() + for post in self._source.getPages(): tax_values = post.config.get(tax_name) if tax_values is None: continue