[Zope] Have Zope a querystring parse routine ? (plus others)

fowlertrainer at anonym.hu fowlertrainer at anonym.hu
Thu Jun 24 03:50:14 EDT 2004


Hi !


1.)
I want to use query-string, and post datas  in combined dictionary.
I have a page that I must access with special query string,  but it have 
post datas.

The simple way is to redefine the post action, not the use of hidden 
parameters:

action="/?pid=113"

But if I post that page, the pid is not in request, or request.form, 
because it is in query string, and Zope is use that post datas, not the 
query string.

So query string is unparsed, and if I want to get the params, I need to 
parse items, and place in querydict dictionary.
My parse routine (what a pity) not handle the non-us, or other special 
characters.

How to I do it simply ?

2.)
How to I avoid in Zope that request.form items are appear in request ?
It is a possible way to inject variables in request from out...

3.)
I there a way in Zope to get some often used routines simply ?
(Aliases ?)

Now I need to repeat in every pyscript:

rq=context.REQUEST
...

or
CreateCombo=context.routines.html.CreateCombo
combotext=CreateCombo(name,id,items,......)

I think that often used routines are placeable in request dictionary:
init.py
rq=context.REQUEST
oup={} # often used procs
proc=context.routines.html.CreateCombo
oup['CreateCB']=proc
rq.set('OUP',oup)

usage:
rq=context.REQUEST;oup=rq['OUP']
proc=oup['CreateCB']
proc(.....)

But have a Zope an alias to use the procs with simply aliases ?

Thanx for help:
 FT
 




More information about the Zope mailing list