diff piecrust/data/base.py @ 256:da5e6e00fb41

bake/serve: Make previewed and baked URLs consistent. The preview server now handles the `pretty_urls` setting correctly instead of forcing it. The `trailing_slash` and `pagination_suffix` setting are also doing the same between the 2 systems.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 22 Feb 2015 22:01:58 -0800
parents f130365568ff
children 422052d2e978
line wrap: on
line diff
--- a/piecrust/data/base.py	Fri Feb 20 23:44:23 2015 -0800
+++ b/piecrust/data/base.py	Sun Feb 22 22:01:58 2015 -0800
@@ -125,7 +125,7 @@
         route = page.app.getRoute(page.source.name, page.source_metadata)
         if route is None:
             raise Exception("Can't get route for page: %s" % page.path)
-        return route.getUri(page.source_metadata, page)
+        return route.getUri(page.source_metadata, provider=page)
 
     def _loadCustom(self):
         page_url = self._get_uri()