[z3] SQLOS Issues

Michael MacFadden mike at macfadden.org
Wed Apr 27 18:30:04 CEST 2005


You are correct on the introspection issue.  If I add an explicit 
permission for the __module__ attribute on the SQLOS content object the 
introspection tab comes up ok.  Although there isn't as much information 
in the view as I think there should be (meaning something may still be 
wrong).  What I don't understand is why I have to explicitly added a 
permission for the __module__ attribute for the sqlos table row object?  
I don't have to do this for any other object.  Strange.

~Mike

Sidnei da Silva wrote:

>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.
>
>  
>




More information about the z3 mailing list