thnx 4 the tip. but i got the following error when testing Error Type AttributeError Error Value 'dict' object has no attribute 'districtname' I don have anything like 'dict' . the stmt was ; <div tal:repeat="district python:context.getDistrictUser(district_name=request.form.districtname)"> district_name is parameter name in ZSQL method. i must tell u dat this repeat tag is being used to fill data in a combobox n i'm getting the districtname from another combobox selection. The same logic worked with asp but don kno y giving error here.plz help. Hong Yuan wrote: You can use python syntax to pass parameters explicitly to ZSQL methods, like: <div tal:repeat="district python:context.getDistrictUser(some_param=request.form.districtname)"> prabuddha ray wrote:
I've a parmetarized ZSQL method used to fill data in a combobox. When changing the selection of another combobox i'm calling the page itself again and have to pass the value in the previously selected combobox as parameter in the ZSQL method filling data in 2nd combobox.
i tried this <div tal:repeat="district container/getDistrictUser" request.form.districtname> , districtname is the parameter to be passed
what sud be the correct syntax
--On Samstag, 5. März 2005 5:50 Uhr +0000 prabuddha ray <buddha_2001@rediffmail.com> wrote:
thnx 4 the tip. but i got the following error when testing
Error Type AttributeError Error Value 'dict' object has no attribute 'districtname'
I don have anything like 'dict' .
the stmt was ; <div tal:repeat="district python:context.getDistrictUser(district_name=request.form.districtname)">
request.form is usually a mapping/dictionary but *not* a record-style object...means you need to access through the Python dictionary methods *wink* -aj
participants (2)
-
Andreas Jung -
prabuddha ray