Renamed TALES extension from "extension:" to "tales:"
authorThierry Florac <thierry.florac@onf.fr>
Mon, 09 Jul 2018 13:34:24 +0200
changeset 216 8a6c250fe655
parent 215 0910e92af5e7
child 217 46402f73be89
Renamed TALES extension from "extension:" to "tales:"
src/pyams_utils/include.py
src/pyams_utils/tales.py
--- a/src/pyams_utils/include.py	Fri Jul 06 09:47:39 2018 +0200
+++ b/src/pyams_utils/include.py	Mon Jul 09 13:34:24 2018 +0200
@@ -68,5 +68,7 @@
     if hasattr(config, 'load_zcml'):
         config.load_zcml('configure.zcml')
 
-    PageTemplateFile.expression_types['extension'] = ExtensionExpr
-    Z3cPageTemplateFile.expression_types['extension'] = ExtensionExpr
+    PageTemplateFile.expression_types['tales'] = ExtensionExpr
+    PageTemplateFile.expression_types['extension'] = ExtensionExpr  # deprecated
+    Z3cPageTemplateFile.expression_types['tales'] = ExtensionExpr
+    Z3cPageTemplateFile.expression_types['extension'] = ExtensionExpr  # deprecated
--- a/src/pyams_utils/tales.py	Fri Jul 06 09:47:39 2018 +0200
+++ b/src/pyams_utils/tales.py	Mon Jul 09 13:34:24 2018 +0200
@@ -97,7 +97,7 @@
 
 
 class ExtensionExpr(ContextExprMixin, StringExpr):
-    """extension: TALES expression
+    """tales: TALES expression
 
     This expression can be used to call a custom named adapter providing ITALESExtension interface.
     """