[Zope] url path remainder as a script parameter?

Kent Watsen kent at watsen.net
Tue Feb 22 04:34:59 EST 2005


Dieter, thank you for your time and patience!

I found a product called DirArg that seems to do the trick, but its own 
documentation says that it is deprecated by traverse_subpath...

I also found http://zope.org/Members/lalo/scriptclass and have now 
written a simple Python-based product, which I am now modifying to 
derive off the Script class, but the instructions are a little 
cryptic...   But I think that I'm still missing something fundamental - 
a normal product has a class that has an index_html method - is the goal 
for my Script-derived product class's index_html method to have the 
traverse_subpath variable defined?

Also, the normal product's index_html is initialized using something like:
    index_html = DTMLFile("index_html", globals())
Is there such a thing as:
    index_html = PythonScriptFile("index_html", globals())
??? I googled, but couldn't find anything...

Again, my high-level goal is to have a Product that uses 
traverse_subpath to form a query against another application - surely 
this is not uncommon...

Thanks!
Kent



Dieter Maurer wrote:

>Kent Watsen wrote at 2005-2-21 01:21 -0800:
>  
>
>>...
>>I can get it to work when adding the Script directly, but 
>>traverse_subpath does not work when I try to do the same with a Script 
>>"Method" [index_html] added to a ZClass in a Product I created inside 
>>the ZMI - when my URL contains a path beyond the product, Zope displays 
>>a "Cannot locate object" error...
>>    
>>
>
>"index_html" is only automatically added after the complete URL.
>
>There is a mixin class around (though I do not know its name!)
>that provides traversal control for ZClasses.
>You will need to search the Web to locate it -- or use a Python Script
>outside a Z Instance...
>
>  
>



More information about the Zope mailing list