[Zope] Newbie to Zope
zope
zope@stylusinc.net
Fri, 26 Jul 2002 08:56:07 +0530
This is a multi-part message in MIME format.
------=_NextPart_000_0033_01C23482.47F3D470
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi=20
I am a Newbie to zope.
I am interested in working in zope and have been involved in work =
related with Pythonscripts and PostgreSql and Page Templates.
I have become stuck at a point and I am not able to find what to do =
next.
I am using a python Script to run a ZSQL method and then the values are =
to be sent to the Page Template to be displayed.The Script is:
from Products.PythonScripts.standard import html_quote
r =3D context.ond.db.zqll_clin # this is a zsql method in a different =
folder at root=20
for x in r:
print x['Id'],x['Name'],x['tt'] # these are the fields of the table =
return r
The error message I get is
Error Type: KeyError
Error Value: 0
Am i not being able to get the record set from the database?Because if I =
give a print command in the loop it does not work.HEnce it may not be =
entering the loop.What is the method to access a Zsql Method which is =
another folder?
If there is someone who could help me out here it would be very =
helpful.Since i am stuck with this problem for 2 days and I have tried =
other possibilities.
Regards
John Kunchandy
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002
------=_NextPart_000_0033_01C23482.47F3D470
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I am a Newbie to zope.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I am interested in working in zope and =
have been=20
involved in work related with Pythonscripts and PostgreSql and Page=20
Templates.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I have become stuck at a point =
and I am not=20
able to find what to do next.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I am using a python Script to run =
a ZSQL=20
method and then the values are to be sent to the Page Template to be=20
displayed.The Script is:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>from Products.PythonScripts.standard =
import=20
html_quote</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>r =3D =
context.ond.db.zqll_clin #=20
this is a zsql method in a different folder at root </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>for x in r:<BR> print=20
x['Id'],x['Name'],x['tt'] # these are the fields of the =
table=20
<BR></FONT><FONT face=3DArial size=3D2>return r</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>The error message I get =
is</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<P><STRONG>Error Type: KeyError</STRONG><BR><STRONG>Error Value:=20
0</STRONG><BR>Am i not being able to get the record set from the=20
database?Because if I give a print command in the loop it does not =
work.HEnce it=20
may not be entering the loop.What is the method to access a Zsql =
Method=20
which is another folder?</P>
<P>If there is someone who could help me out here it would be very =
helpful.Since=20
i am stuck with this problem for 2 days and I have tried other=20
possibilities.</P></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Regards</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>John Kunchandy</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2><BR>---<BR>Outgoing mail is certified =
Virus=20
Free.<BR>Checked by AVG anti-virus system (<A=20
href=3D"http://www.grisoft.com">http://www.grisoft.com</A>).<BR>Version: =
6.0.380 /=20
Virus Database: 213 - Release Date: 7/24/2002</FONT></DIV></BODY></HTML>
------=_NextPart_000_0033_01C23482.47F3D470--