Re: [Zope] Tree tag and namespaces
On 03/02/2001, I got an answer to my question regarding dtml-tree - see: http://zope.nipltd.com/public/lists/zope-archive.nsf/47ba74c812dbc5dd8025687... Now, that I've upgraded from 2.3.0 to 2.4.1, <dtml-tree ... branches_expr="yourDTMLmethod(_vars.None,_vars)"> .... </dtml-tree> doesn't work anymore! The problem is the yourDTMLmethod(_vars.None,_vars), I get the following: Error Type: SyntaxError Error Value: Line 2: "_vars" is an invalid variable name because it starts with "_" traceback: [...] File /usr/local/Zope-2.4.1-linux2-x86/lib/python/DocumentTemplate/DT_String.py, line 546, in __call__ (Object: baum) -> this is the name of the method which creates the tree File /usr/local/Zope-2.4.1-linux2-x86/lib/python/TreeDisplay/TreeTag.py, line 159, in render (Object: a tree tag) File /usr/local/Zope-2.4.1-linux2-x86/lib/python/TreeDisplay/TreeTag.py, line 269, in tpRender (Object: LockableItem) File /usr/local/Zope-2.4.1-linux2-x86/lib/python/TreeDisplay/TreeTag.py, line 325, in tpRenderTABLE (Object: LockableItem) File /usr/local/Zope-2.4.1-linux2-x86/lib/python/DocumentTemplate/DT_Util.py, line 209, in eval (Object: search(_vars.None,_vars)) -> search is the method which returns the nodes to display File /usr/local/Zope-2.4.1-linux2-x86/lib/python/RestrictedPython/Eval.py, line 143, in prepRestrictedCode (Object: search(_vars.None,_vars)) <dtml-tree single="1" skip_unauthorized="1" branches_expr="search(_vars.None,_vars)"> ... </dtml-tree> Hey, what's going on here? I've absolutely NO idea where to start! Would be nice if Dieter could give me a response; but of course any suggestions are welcome! BTW: Second strange error (independent from the above one!): [...] File /usr/local/Zope-2.4.1-linux2-x86/lib/python/DocumentTemplate/DT_String.py, line 546, in __call__ (Object: 984400993) File /usr/local/Zope-2.4.1-linux2-x86/lib/python/DocumentTemplate/DT_Util.py, line 231, in eval (Object: pub.restrictedTraverse(_.string.join([bilderpfad, firmenlogoKlein], ''))) (Info: bilderpfad) File <string>, line 2, in f (Object: guarded_getattr) File /usr/local/Zope-2.4.1-linux2-x86/lib/python/OFS/Traversable.py, line 233, in restrictedTraverse (Object: LockableItem) File /usr/local/Zope-2.4.1-linux2-x86/lib/python/OFS/Traversable.py, line 193, in unrestrictedTraverse (Object: ApplicationDefaultPermissions) NameError: global name 'has' is not defined I never declared such a var or used it. Both (the first AND the second) examples worked perfectly under 2.3.0. Has something changed in 2.4.1 I have to think of? TIA Lars
participants (1)
-
Lars Heber