[Zope] Traversal question

David Pratt fairwinds at eastlink.ca
Wed Jun 22 11:06:36 EDT 2005


I have gone over the zope book to see what I can do about calling a sql  
with a form and getting three additional parameters in the request and  
am wanting this to get better looking urls that calling the parameters  
directly in the url.  I asked a similar question yesterday but perhaps  
it was not clear enough about what asking. It is really a traversal  
question and how to string together a sql query with a zpt form that  
also requires parameters from the request namespace.

I can call my zsql method and then my edit form like this:
/employee_by_id/employee_id/42/employee_edit_form

or with simple direct traversal on the zsql method:
/employee_by_id/42/employee_edit_form

Problem is I need three other parameters in the request for my edit  
form to satisfy my sorting so when the edit form returns it is back on  
the same batch page

Parameters passed in traversal go into the request namespace according  
to the zope book so was hoping for something similar to this which  
doesn't work - and I can't see how it could.

/employee_by_id/employee_id/42/employee_edit_form/start/2/sort/ 
employee/reverse/0

The zope book examples are with python scripts so am not sure whether  
this is possible with a ZPT that also requires parameters from the  
request  or will I need a script to be called in the path somewhere to  
pick up the results of the query and then pass parameters to the form -  
something like:

/employee_by_id/employee_id/42/some_other_script/start/2/sort/employee/ 
reverse/0/employee_edit_form

where some_other_script would be a script python.  Any hints to help me  
understand what can be done with traversal like this would be  
appreciated since I would rather have nice urls instead of stringing  
parameters directly in the url with all the ?= and &'s.

Regards,
David


More information about the Zope mailing list