[Grok-dev] Derived interfaces and indexing

Christian Klinger cklinger at novareto.de
Fri Jul 31 09:42:05 EDT 2009


Hi Jeroen,

you have added a new instance of MyApp?

Because the catalog stuff gets initalized only at this
time.

Christian

> If you do this:
> 
> class IMainInterface(Interface):
>    name=schema.TextLine(title=u'Name')
> 
> class IDerivedInterface(IMainInterface):
>    pass
> 
> class Derived(grok.Model):
>     grok.implements(IDerivedInterface)
> 
> 
> class MainIndexes(grok.Indexes):
>     grok.site(MyApp)
>     grok.context(IMainInterface)
>     grok.name('main_catalog')
>     
>     name = grok.index.Field()   
> 
> Objects of class 'Derived' should be indexed by MainIndexes, right?
> 
> Apparently, in my app this doesn't seem to happen, but I don't have a clue
> why not...
> Does anybody have any ideas?



More information about the Grok-dev mailing list