[Zope3-Users] can't seem to get data from proxied database rows

Garrett Smith garrett at mojave-corp.com
Mon Mar 21 22:47:32 EST 2005

Hi Matt,

I haven't used the rdb package, but from what I can tell, it's setup to
allow you to read col values as attributes. E.g.


In tales, this would be:


Btw, you don't need (or want) to using python for basic tales
statements. E.g.


should just be:


And not to be too critical ;) but I'd call it 'row' instead of 'name'.

 -- Garrett

-----Original Message-----
From:	matt wilbert
Sent:	Sun 3/20/2005 3:02 PM
To:	zope3-users at zope.org
Subject:	[Zope3-Users] can't seem to get data from proxied
database rows
I have a database connection to a mysql database from ZopeX3.  It
works (I can run test
queries), and I have created a minimal Sql Script ("select * from
test'") which also works when I test it.  It is called "listPeople"

Now I try to use it from a ZPT that looks like this:

<table tal:repeat="name context/listPeople">
  <tr tal:replace="python:name">Name</tr>
I get a result that looks like:

<security proxied zope.app.rdb.GeneratedRowClass instance at
<security proxied zope.app.rdb.GeneratedRowClass instance at
<security proxied zope.app.rdb.GeneratedRowClass instance at

which makes sense because there are three rows in the test table.

However, I can't figure out how to get at the data.  Any attempt to
reference something inside
the proxied objects  (like "python:name[0]" or
"python:name['lastname']" gives me a ForbiddenAttribute error.  Is
this something I can't do with a TTW ZPT, or am I missing something
more straightforward.  I have granted all possible permissions to


Matt Wilbert
Zope3-users mailing list
Zope3-users at zope.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3552 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20050321/c5132dc9/attachment.bin

More information about the Zope3-users mailing list