[Zope] sorry for lame question...

Corey Saltiel corey@axcelerant.com
Sun, 26 Jan 2003 10:38:04 -0800


I'm completely new to Zope and am starting out with something I imagine is 
amazingly simple - but after many attempts and perusals of docs and lists,
I'm still unable to figure this one out...


Using ZPT - how do I get the value returned from a ZSql method? This method only
ever returns *one* value; I'd rather not do a tal:repeat if I'm able to. 

The best I can do is:

<span tal:replace="here/my_ZSql_method">


Which provides:

"<Shared.DC.ZRDB.Results.Results instance at 0x8c6df8c>"


I don't want the instance - I want the value, of course.

( My lack of Python knowhow may make the obvious less so )


Also - could someone point me to the document(s) that explain or show an example
of this? I was unable to find it explained anywhere. 

There's a ton of stuff on DTML - but I'm only interested in using ZPT wherever
possible. Shouldn't the Zope Book ( I'm reading v. 2.6 ) try to use ZPT in all 
it's standard examples rather than DTML?

Why can't ZPT be used in other places, like ZSql methods? There is some serious
confusion on where to use ZPT and where to use DTML. Why should a new user be
required to learn *both* -- especialy when it's arguable that ZPT is more 
"correct" ( in so far as much as better separation of logic from presentation,
html/xml friendly, etc., etc. )

I get the distinct impression from the zope-dev list that ZPT is, generaly, the 
new desired replacement for DTML for most uses.

Thanks!