[Grok-dev] Derived interfaces and indexing

Jeroen Michiel jmichiel at yahoo.com
Tue Aug 4 09:39:39 EDT 2009


It didn't work after deleting and re-adding my app, but suddenly did after
changing some code.
That's why I am clueless. Perhaps I forgot to restart the server at some
point, or perhaps a .pyc file wasn't deleted/updated (this sometimes
happens, it seems, at least on windows).

Anyway, it does work as expected now, that's the good news!


Christian Klinger wrote:
> 
> 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?
> 
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev
> 
> 

-- 
View this message in context: http://www.nabble.com/Derived-interfaces-and-indexing-tp24756457p24808867.html
Sent from the Grok mailing list archive at Nabble.com.



More information about the Grok-dev mailing list