[ZPT] CVS: Products/PageTemplates - ZRPythonExpr.py:1.6

evan@cvs.baymountain.com evan@cvs.baymountain.com
Wed, 25 Jul 2001 14:25:14 -0400


Update of /cvs-repository/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv13493

Modified Files:
	ZRPythonExpr.py 
Log Message:
Fix calls to DTML to use new security properly.
 
=== Products/PageTemplates/ZRPythonExpr.py 1.5 => 1.6 ===

 
 from DocumentTemplate.DT_Util import TemplateDict, InstanceDict
+from AccessControl.DTML import RestrictedDTML
+class Rtd(RestrictedDTML, TemplateDict):
+    this = None
+
 def call_with_ns(f, ns, arg=1):
-    td = TemplateDict()
-    td.this = None
+    td = Rtd()
     td._push(ns['request'])
-    td._push(InstanceDict(ns['here'], td, guarded_getattr))
+    td._push(InstanceDict(ns['here'], td))
     td._push(ns)
     try:
         if arg==2: