[Zope] Re: Calling DTML

Kevin Carlson khcarlso@bellsouth.net
Thu, 19 Dec 2002 18:12:30 -0500


Maik,

Thanks for the quick response.  Both number 1 and 2 are OK.  When I do this
:

   return _['updoc'](container, _)

I get an attribute error on guarded_getattr.  If I reverse the order of the
arguments like (_, container) I get an even stranger error:

   Error Type: KeyError
   Error Value: standard_html_header

I don't understand this error since I clearly have 'updoc' as the key and
the traceback indicates it is coming from the return _['updoc']... line.

Any more ideas?  Could this be a bug in 2.6?

Kevin

-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Maik
Jablonski
Sent: Thursday, December 19, 2002 6:00 PM
To: zope@zope.org
Subject: [Zope] Re: Calling DTML


Kevin Carlson wrote:
> Forwarding control from a Python script a DTML method in Zope 2.5.1 used
to
> work like this:
>
>    return _['updoc'](container, request)
>
> Now I am getting a Key error on 'updoc' which is a DTML method in the same
> skinned folder as the script.

1. Check that 'updoc' is a DTML-Method and not a DTML-Document.
2. Check Bindings-Tab in PythonScript. Is _ set as namespace-binding?
3. Try to submit the whole namespace to your DTML-Method:
    return _['updoc'](container, _)

-mj




_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )