[Checkins] SVN: z3c.pt/trunk/ Allow more flexibility in overriding the PathTranslator method.

Hanno Schlichting plone at hannosch.info
Sat Nov 29 07:33:01 EST 2008


Log message for revision 93443:
  Allow more flexibility in overriding the PathTranslator method.
  

Changed:
  U   z3c.pt/trunk/CHANGES.txt
  U   z3c.pt/trunk/src/z3c/pt/expressions.py

-=-
Modified: z3c.pt/trunk/CHANGES.txt
===================================================================
--- z3c.pt/trunk/CHANGES.txt	2008-11-29 09:34:09 UTC (rev 93442)
+++ z3c.pt/trunk/CHANGES.txt	2008-11-29 12:33:01 UTC (rev 93443)
@@ -4,6 +4,8 @@
 Head
 ~~~~
 
+- Allow more flexibility in overriding the PathTranslator method. [hannosch]
+
 - Removed the forced defaultencoding from the benchmark suite. [hannosch]
 
 Version 1.0b4 - November 19, 2008

Modified: z3c.pt/trunk/src/z3c/pt/expressions.py
===================================================================
--- z3c.pt/trunk/src/z3c/pt/expressions.py	2008-11-29 09:34:09 UTC (rev 93442)
+++ z3c.pt/trunk/src/z3c/pt/expressions.py	2008-11-29 12:33:01 UTC (rev 93443)
@@ -81,6 +81,7 @@
         r'\?[A-Za-z][A-Za-z0-9_]+')
 
     path_traverse = ZopeTraverser()
+    scope = 'request'
 
     symbol = '_path'
 
@@ -172,8 +173,8 @@
 
         base = parts[0]
         value = types.value(
-            '%s(%s, request, %s, %s)' % \
-            (self.symbol, base, not nocall, ', '.join(components)))
+            '%s(%s, %s, %s, %s)' % \
+            (self.symbol, base, self.scope, not nocall, ', '.join(components)))
 
         if negate:
             value = types.value('not(%s)' % value)



More information about the Checkins mailing list