[Kss-devel] Get currentForm to put items on request
Hedley Roos
hedley at upfrontsystems.co.za
Tue Nov 6 16:59:35 CET 2007
Is there a way to get currentForm to not just pass a dictionary to the
Python Script parameter but to actually put the values on the request.
My kss rule:
input#login-form-submit:click {
evt-click-preventdefault: True;
action-server: kss_login_form;
kss_login_form-form: currentForm();
}
And subsequently in my Python Script request.form has value
{'form':{'foo':1', 'bar':'2'}}
What I would like to do is "collapse" that dictionary and have foo and
bar on my request directly, ie. request.get('foo') returns 1.
A while back I wrote a Zope compatible marshaller in javascript for
azax. IIRC there is a point where an url is constructed in javascript.
Currently this is something like ?form.foo=1&form.bar=2 (this is all
from memory). It should be trivial to do ?foo=1&bar=2
Why do I want this? Well, ZPublisher et al kicks in before my Python
Script is evaluated, which means my authentication info for one is
incorrect since the request is not in the expected state.
Ideas Balazs, Godefroid?
Thanks
Hedley
More information about the Kss-devel
mailing list