[z3] SQLOS Issues
Sidnei da Silva
sidnei at awkly.org
Wed Apr 27 01:45:54 CEST 2005
On Tue, Apr 26, 2005 at 04:21:16PM -0400, Michael MacFadden wrote:
| The first problem is introspection on the table row objects doesn't
| work. I can introspect the container just fine, but when I try to click
| the introspection tab for the table row object I get the following error:
| ForbiddenAttribute: ('__module__', <class
| 'fitnesstracker.database.fooditem.FoodItem'>)
Humm... No clue. I would guess the introspection is broken. One way or
another, you can probably declare __module__ publicly accessible for
that class in ZCML and it should possibly work.
| Not sure what is going on here. The permissions for the container and
| for the row object seem to be similar so I am not sure why I can
| introspect on but not the other. The permissions were pretty much
| copied right out of the online example.
|
|
| The second problem I have is trying to add a new row to my table. I
| have added an addMenuItem and addform statements to my configure file.
| When I click on the add item, I get the schema based add form, but
| submitting this form gives this error:
|
| raise TypeError, "%s() did not get expected keyword argument %s" %
| (self.__class__.__name__, column.name)
| TypeError: FoodItem() did not get expected keyword argument category_id
Yeah, you're FoodItem didn't get the category_id argument. Probably
you didn't add it to the schema, or maybe you didn't add it to the
addform directive as 'keyword_arguments' or 'set_before_add' (can't
remember).
| I am guessing this error is something I have wrong in either the python
| code in either the interface or the class for the table row object.
You are right.
--
Sidnei da Silva <sidnei at awkly.org>
http://awkly.org - dreamcatching :: making your dreams come true
http://www.enfoldsystems.com
http://plone.org/about/team#dreamcatcher
<exarkun> bring on the dancing monkeys
<Tenshihan> radix?
<exarkun> That works
More information about the z3
mailing list