diff piecrust/templating/jinjaengine.py @ 787:f6f9a284a5f3

routing: Simplify how route functions are declared and handled. * Site config now only has to declare the function name. * Simply code for running route functions.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 01 Sep 2016 23:00:58 -0700
parents b91fe30ae7aa
children 0da1207472d3
line wrap: on
line diff
--- a/piecrust/templating/jinjaengine.py	Thu Sep 01 22:58:31 2016 -0700
+++ b/piecrust/templating/jinjaengine.py	Thu Sep 01 23:00:58 2016 -0700
@@ -236,7 +236,7 @@
 
         # Add route functions.
         for route in app.routes:
-            name = route.template_func_name
+            name = route.func_name
             func = self.globals.get(name)
             if func is None:
                 func = CompositeRouteFunction()