[Zope3-Users] Calling ZSQL from ZPT
alebald
aleyraza57 at hotmail.com
Wed Oct 10 11:40:09 EDT 2007
Hi All,
I am a newbie in zope and also to zope3. I am trying to fetch some data from
mysql and want to display it in ZPT. my code is below
#################################################################
<html>
<head>
<title>Page Title</title>
</head>
<body>
<br>The URL is URL.
<table>
<tr tal:repeat=" item sqldisplay">
<td tal:content="item/DisplayController_ID">ID</td>
<td tal:content="item/IPAddress">IPAddress</td>
<td tal:content="item/MACAddress">MAC Address</td>
</tr>
</table>
</body>
<!-- A Working Example -->
<p tal:repeat="txt python:'one', 'two', 'three'">
</p>
</html>
#################################################################
but it gives me an exception
KeyError: 'sqldisplay'
Although I have defined "sqldisplay" method ( From ZMI i create a SQL
script and passed it dsn[:mysq] and this script / method it self is working
fine. but on calling this method/sql script from zpt i get an exception.
is sql script option in ZMI (zope3) is new name of ZSQL method.?? bcoz i
have read in books that i need to defined a ZSQL method, but in my zope3-zmi
i donot see any ZSQL option but SQL Script.
Aleblad
--
View this message in context: http://www.nabble.com/Calling-ZSQL-from-ZPT-tf4601646.html#a13138449
Sent from the Zope3 - users mailing list archive at Nabble.com.
More information about the Zope3-users
mailing list