[Zope-DB] Hello!
Philip Kilner
phil@xfr.co.uk
Fri, 18 Jul 2003 17:18:13 +0100
This is a cryptographically signed message in MIME format.
--------------ms050909060008010702020907
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
Hi Geir,
Geir Bækholt wrote:
> 3. make a (simple) pagetemplate to display the restults from 2
> something like this snippet should get you somewhere :)
> <p tal:repeat="sqlresults here/yourZsqlMethod">
> <span tal:content="sqlresults/variable1" /> ,
> <strong tal:content="sqlresults/variable2" />
> </p>
>
That woorked great - I need to get my head around the cosmetic stuff of
ZPT, but that's documented all over the place.
I'm on to my insert form now, and can't quite see how to get "from a to
b" again: -
- The "target" of the process is a ZSQL method called "insertBook". It
takes four arguments: field_ISBN, field_Title, field_Author,
field_BookPrice.
- The source is the form "insert_book", which is a ZPT.
Now I have to join the two togther, and that requires two logical steps
- stripping out my use of Formulator (Only until I understand this) and
replacing the DTML functionality with ZPT logic. Under DTML, insert_book
contained a form with method="POST" and action="bookAddAction".
BookAddAction was a DTML method, which embodied the Formulator
functionality - at the end of the method my data is in the REQUEST
object and so when the method called the "insertBook" ZSQL Method the
dat was inserted.
So: -
- How do I call the "insertBook" ZSQL method from within a ZPT?
&
- Do I have to do anything special to map my field names to the
parameters that the ZSQl expects?
(I've written this partly as a test of whether I understand it myself -
I'll fire the email off and go RTFM now!)
--
Regards,
PhilK
Email: phil@xfr.co.uk / Voicemail & Facsimile: 07092 070518
"As we enjoy great advantages from inventions of others,
we should be glad of an opportunity to serve others by
any invention of ours; and this we should do freely and
generously." - Benjamin Franklin
--------------ms050909060008010702020907
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature
MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJODCC
AvowggJjoAMCAQICAwooUTANBgkqhkiG9w0BAQQFADC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