[ZPT] Confused about Zope
Chris Withers
chrisw@nipltd.com
Wed, 05 Mar 2003 12:21:04 +0000
Evan Simpson wrote:
> color = path('options/color | nothing')
> type_id = path('options/type_id | nothing')
> "select * from products "
> if color or type_id:
> " where "
> if color:
> "color = " + path('color/sql:string')
> if color and type_id:
> " and "
> if type_id:
> "type_id = " + path('type_id/sql:int')
Yuk. That's nothing like ZPT and would have to be learned as a seperate
language. Avoiding that was the whole reason I started this thread...
> Of course, DTML has specialized tags for SQL and Email for a reason.
> It's much nicer to have a mini-language that enables you to write:
>
> select * from products
> <dtml-sqlgroup where>
> <dtml-sqltest color type=string optional>
> <dtml-and>
> <dtml-sqltest type_id type=int optional>
> </dtml-sqlgroup>
I think the Zope 3 API stuff will handle this without the need for a mini language.
cheers,
Chris