[Zope] Calling dtml method from PythonScript, _.None, _ ?
Brad Clements
bkc@murkworks.com
Wed, 2 May 2001 09:39:53 -0400
I'm trying to eliminate query strings on my DHTML methods, to convert
http://myhost.com/Products?productid=xyz
into
http://myhost.com/ProcessPath/xyz/ProductInfo.htm
I've created a Python Script (2.3.2) that looks like this:
---
target = traverse_subpath[-1]
if target == 'ProductInfo.htm':
container.Products(context,productid=traverse_subpath[0])
---
Also other variations of the function call, none work.
basically I'm getting a KeyError in <standard_html_header> (called from Products) on
'bgcolor'
where standard_html_header has
<dtml-unless bgcolor>
...
</dtml-unless>
This code works when not passing through a Python Script call. What is the correct way
to emulate a <dtml-var> call from a Python Script?
Any idea why the dtml-unless fails when called indirectly through a python script?
---
I know about the PathHandler product, but that doesn't quite fit my needs, my Python
Script will be more complicated once I get this working.
Brad Clements, bkc@murkworks.com (315)268-1000
http://www.murkworks.com (315)268-9812 Fax
netmeeting: ils://ils.murkworks.com AOL-IM: BKClements