[BlueBream] Tutorial Section 5.6.4
john at saponara.net
Wed Mar 3 21:39:24 EST 2010
i havent had time yet to work thru the tutorial, but i can say that the
<class> block does .not. belong in a py file but rather in a zcml file.
proceeding to thinner ice, i think that error message is saying that
youre trying to import an interfaces.py file but it doesnt exist in the
same folder as the zcml file. it looks only in the same folder because
of that first dot in:
i hope this helps (and i hope it's right),
Paul Harouff wrote:
> Where is this second block of code for marker interfaces supposed to go in?
> [Note: I use csdb instead of ticketcollector, csdbDataCollector
> (schema for 18 data fields) instead of ICollector (just name and
> description). Otherwise the code should be identical to the tutorial.]
> 11<class class=".csdb.Collector">
> 12 <implements
> 13 interface="zope.annotation.interfaces.IAttributeAnnotatable"
> 14 />
> 15 <implements
> 16 interface="zope.container.interfaces.IContentContainer"
> 17 />
> 18 <require
> 19 permission="zope.ManageContent"
> 20 interface=".interfaces.csdbDataCollector"
> 21 />
> 22 <require
> 23 permission="zope.ManageContent"
> 24 set_schema=".interfaces.csdbDataCollector"
> 25 />
> I put it in csdb.py and got
> ZopeXMLConfigurationError:: File "...\configure.zcml", Line 21.4-26.10
> SyntaxError: invalid syntax (csdb.py, line 30)
> I put it in interfaces.py and got
> ZopeXMLConfigurationError:: File "...\configure.zcml", Line 6.4-9.10
> SyntaxError: invalid syntax (interfaces.py, line 142)
> I put it in configure.zcml and got
> ZopeXMLConfigurationError:: File "...\configure.zcml", Line 11.5
> ImportError: No module named tc.main.interfaces
> I don't understand what this section of the tutorial is trying to do.
> Where does this code go? I looked at every file in the main folder and
> don't see any file that uses "<class" (i.e., a less than sign with
> class tag)
> bluebream mailing list
> bluebream at zope.org
More information about the bluebream