Exemplo n.º 1
0
class MammothIndexes(grok.Indexes):
    grok.site(Herd)
    grok.context(IMammoth)

    name = index.Field()
    age = index.Field()
    message = index.Text()
Exemplo n.º 2
0
class WorkflowIndexes(grok.Indexes):
    grok.site(Blog)
    grok.context(IWorkflowState)
    grok.name('entry_catalog')

    workflow_state = index.Field(attribute='getState')
    workflow_id = index.Field(attribute='getId')
Exemplo n.º 3
0
class MammothIndexes(grok.Indexes):
    grok.context(Mammoth)
    grok.name('foo_catalog')

    name = index.Field()
    age = index.Field()
    message = index.Text()
Exemplo n.º 4
0
class EntryIndexes(grok.Indexes):
    grok.site(Blog)
    grok.context(IEntry)
    grok.name('entry_catalog')

    title = index.Text()
    content = index.Text()
    published = index.Field()
    categories = index.Set()
Exemplo n.º 5
0
class MammothIndexes(grok.Indexes):
    grok.site(Herd)
    grok.context(IMammoth)

    name = index.Field()
    how_old = index.Field(attribute='age')
Exemplo n.º 6
0
def func():
    foo = index.Field()
Exemplo n.º 7
0
class MammothIndexes(grok.Indexes):
    grok.site(Herd)
    grok.context(IMammoth)

    foo = index.Field()
Exemplo n.º 8
0
class MammothIndexes2(grok.Indexes):
    grok.site(Herd)
    grok.context(IMammoth2)

    name = index.Field()