[Zope3-Users] newbie problems with new content-type

Lorenzo Gil Sanchez lgs at sicem.biz
Mon Feb 6 13:20:11 EST 2006


Christoph Frick wrote:
> On Mon, Feb 06, 2006 at 06:48:30PM +0100, Lorenzo Gil Sanchez wrote:
> 
>> c:\path\to\my\instance\bin\test -vpu --dir z:\my_root_app_dir
>> [ traceback ]
>> ImportError: No module named z:.my_root_app_dir
> 
> dunnonothing about windows - but either the test-environment can not
> handle the leading "letter:" or a relative path is expected.

Yeah, that's what I though so I try executing it with relative paths as 
you can see from my second try (in the original message).

> 
>> ForbiddenAttribute: ('name', <my_root_app_dir.provider.Provider object 
>> at 0x034A2730>)
>>
>>   <addform
>>       label="Add Provider"
>>       name="AddProvider.html"
>>       schema="my_root_app_dir.interfaces.IProvider"
>>       content_factory="my_root_app_dir.provider.Provider"
>>       fields="name phone address email"
>>       permission="zope.ManageContent"
>>       />
> 
> is it possible you forgot to provide permissions for setting the schema?
> 
> <content class=".provider.Provider">
> 	<implements
> 		interface="zope.app.annotation.IAttributeAnnotatable" />
> 		<require permission="zope.View"
> 			interface=".interface.IProvider" 
> 		/>
> 		<require permission="zope.ManageContent"
> 			set_schema=".interfaces.IProvider"
> 		/>
> </content>
> 
> where interface.IProvider should have an attribute ``name''.
> 

Thanks a lot Christoph. That was exactly my problem. It's great to have 
so fast feedback.

Lorenzo

> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users



More information about the Zope3-users mailing list