[silva-dev] Custom Content Type does not show up
Samuel Schluep
schluep at iha.bepr.ethz.ch
Fri May 7 09:30:01 CEST 2004
Hi Eric
Thank you very much for your advice. It was the " __implements__ =
IPublication", which was missing. Multiple inheritance requires carefull
thought and programming.
Regards
Sam
> I had something very similar bite me today, so you might find this
> enlightening:
>
> first, (this may sound stupid if you DID think of it, but I forget it
> every once in a while) did you refresh (or install) you product in the
> Silva Extension Service?
>
> if you did, do your objects implement an interface and do they have a
> docstring? I'm not sure how this works in detail, but here's what I
> found today:
>
> I registered some content types, and they showed up fine. I then added
> a mix-in class that the content types now inherited from, besides
> their original superclass (Publication). As the mix-in overrode (is
> that a word?) some of the methods of Publication, it had to come
> first, so:
>
> MyClass(MixinClass, Publication):
>
> Now, this had no docstring. At this point my memory gets a bit fuzzy,
> but IIRC they still didn't show up in the add menu after adding the
> docstring, but they did when I added:
>
> __implements__ = IPublication
>
> which is of course in the Publication superclass, but somehow seems to
> be overridden by the mixin class? Anyway, maybe just the docstring or
> the interface may be enough, I have to go back and test that, now that
> I think of it, but at least having both works ;) Not very scientific
> and all, so maybe one of the Elder Gods can illuminate me on why this
> was necessary?
>
> Then off course, your problem may be wholly unrelated.
>
> eric
More information about the silva-dev
mailing list