[Zope3-dev] Re: Missing 'provides' attribute exception in API doc
jürgen Kartnaller
j.kartnaller at cable.vol.at
Tue Mar 29 12:22:01 EST 2005
Ok, I mixed up provides and adapts.
provides -> implements
for -> adapts
But anyway, I also have an implements definition in my
PilotPointsACROCUP class :
class PilotPointsACROCUP(PilotPoints):
"""Adapts to point data for ACROCUP.
"""
adapts(IContestPilot, IContest)
implements(IPoints)
Otherwise it would not work.
The result is the same.
Jürgen
jürgen Kartnaller wrote:
>
> I define a class which adapts to two interfaces :
>
> class PilotPointsACROCUP(PilotPoints):
> """Adapts to point data for ACROCUP.
> """
>
> adapts(IContestPilot, IContest)
>
> I register the class as adapter in my configure.zcml :
>
> <adapter
> factory="coma.acrocup.PilotPointsACROCUP"
> name="ACRO-CUP"
> trusted="y"
> />
>
> Notice the missing provides attribute. I left it because I provided
> "adapts" in the class definition.
> Everything works fine in my application with this configuration.
>
> But when I select "ZCML Reference" in API Docs I get a
> "TypeError: Missing 'provides' attribute" exception.
>
>
> When I provide at least one interface in ZCML API doc is happy with it.
>
>
> Jürgen
>
More information about the Zope3-dev
mailing list