RE: HTML data entry forms and ZPTs
"Ken Winter" <[email protected]>
| Newsgroups | gmane.comp.web.zope.page-templates |
|---|---|
| Message-ID | <003801c5563d$d74bf3c0$6603a8c0@kenxp> |
> -----Original Message----- > From: Pim van Stam [mailto:[email protected]] > Sent: Wednesday, May 11, 2005 4:53 AM > To: [email protected] > Cc: [email protected] > Subject: Re: [ZPT] HTML data entry forms and ZPTs ... > > Here is the entire body of the Python script "delete_person_py(id)" that > the > > ZPT <form> tag is trying to call and that in turn invokes the ZSQL > > "delete_person" method: > > > > container.delete_person(person_id=id) > > > > should/could be: > > id = context.REQUEST.get('person_id') > container.delete_person(person_id=id) > > No parameters in the Parameter List of the script. > > > > and here's the ZSQL method "delete_person" that it calls: > > > > delete from person where person_id = <dtml-sqlvar person_id > type=int> > > > > In the ZSQL Method "Arguments" you must have "person_id" added. IT WORKED!!! Thank you thank you! > > If this is working I suggest you to look at Controller Page Template and > Controller Python Script. You can then do easy error checking and do > something *after* deletion (succesful or not). I'm new to Zope. What's a "Controller Page Template" and a "Controller Python Script"? Do you just mean the ZPT and script that we've been talking about here, or are these some special kind of Zope object? - Thanks again - Ken Winter - USA > > With regards > > Pim van Stam > Netherlands