Mercurial > piecrust2
diff piecrust/data/paginationdata.py @ 711:ab5c6a8ae90a
bake: Replace hard-coded taxonomy support with "generator" system.
* Taxonomies are now implemented one or more `TaxonomyGenerator`s.
* A `BlogArchivesGenerator` stub is there but non-functional.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 26 May 2016 19:52:47 -0700 |
parents | 32c7c2d219d2 |
children | d4408fbbbc7d |
line wrap: on
line diff
--- a/piecrust/data/paginationdata.py Thu May 26 19:46:28 2016 -0700 +++ b/piecrust/data/paginationdata.py Thu May 26 19:52:47 2016 -0700 @@ -17,7 +17,7 @@ # TODO: this is not quite correct, as we're missing parts of the # route metadata if the current page is a taxonomy page. route_metadata = create_route_metadata(page) - self._route = page.app.getRoute(page.source.name, route_metadata) + self._route = page.app.getSourceRoute(page.source.name, route_metadata) self._route_metadata = route_metadata if self._route is None: raise Exception("Can't get route for page: %s" % page.path) @@ -66,9 +66,10 @@ ctx = PageRenderingContext(qp) render_result = render_page_segments(ctx) segs = render_result.segments - except Exception as e: + except Exception as ex: + logger.exception(ex) raise Exception( - "Error rendering segments for '%s'" % uri) from e + "Error rendering segments for '%s'" % uri) from ex else: segs = {} for name in self._page.config.get('segments'):