[Zope] getattr default

Mitch Model model@mpi.com
Mon, 29 Oct 2001 08:26:45 -0500


What's wrong with the 'getattr' call in this DTML method?  I get an
error message:  "Name not found or not allowed undefined." (using ZDebug).
(The problem is not the choice of attribute names -- I get it whatever I type
that isn't an attribute in the REQUEST.)  If I arrange to get into pdb from
this method, the getattr expression works fine.  Is this a Zope bug? 

_____________________________________________________________________
<html>
<body>
REQUEST does
<dtml-if expr="not _.hasattr(REQUEST,'undefined')">
not
</dtml-if>
have the attribute 'undefined'.
<p>
value = <dtml-var expr="_.getattr(REQUEST, 'undefined', 'nothing')">
</body>
</html>
_____________________________________________________________________