[Zope-DB] ZPTs and database accesses
lists at andreas-jung.com
Thu Apr 28 14:17:19 EDT 2005
--On Donnerstag, 28. April 2005 14:05 Uhr -0400 Ken Winter
<ken at sunward.org> wrote:
> The Zope Book (version 2.7,
> http://www.plope.com/Books/2_7Edition/ZPT.stx#1-8) implies that you can't
> do "SQL queries" from Zope Page Templates. If this implication is
> correct, I (for one) have a problem, as I'm trying to do all my work with
> ZPTs (rather than DTML) in order to use my WYSIWYG HTML editor
> (DreamWeaver) to design my pages.
> The RDB chapter in the Zope book
> shows a ZPT example that works for getting retrieved data from the
> database through ZSQL objects onto web pages. But I haven't found an
> example of a ZPT for an HTML form that can take data from the web page
> into the database.
You have not read the book correctly. First statement just said that you
can't SQL queries using ZPT. In Zope you specify SQL queries using
*ZSQL methods* that use DTML as markup language...this is not the same
as defining SQL inside DTML methods/documents or Page Templates.
Since ZSQL methods are first-class objects in Zope, you can call them
of course from DTML method/documents, Python Scripts *and* Zope
(as shown in the RDBMS chapter).
Hope this makes things clearer,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-db/attachments/20050428/23986d69/attachment.bin
More information about the Zope-DB