Changeset 6549 for main/waeup.sirp/trunk


Ignore:
Timestamp:
23 Jul 2011, 14:30:13 (13 years ago)
Author:
uli
Message:

Make AccessCodeQueryResultItem? really implement the promised
interfaces.

Also change import of grok.index. For some strange reason the catalog
tests do not work if we import grok and then create grok.index
fields. Importing index from grok explicitly, however, works.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/catalog.py

    r6470 r6549  
    22"""
    33import grok
     4from grok import index
    45from hurry.query import Eq, Text
    56from hurry.query.query import Query
     
    1516    grok.context(IAccessCode)
    1617
    17     code = grok.index.Field(attribute='representation')
    18     history = grok.index.Text(attribute='history')
    19     batch_serial = grok.index.Field(attribute='batch_serial')
    20     state = grok.index.Field(attribute='state')
     18    code = index.Field(attribute='representation')
     19    history = index.Text(attribute='history')
     20    batch_serial = index.Field(attribute='batch_serial')
     21    state = index.Field(attribute='state')
    2122
    2223class AccessCodeQueryResultItem(object):
    2324    grok.implements(IQueryResultItem)
    2425
     26    title = u'Access Code Query Item'
     27    description = u'Some access code found in a search'
     28
    2529    def __init__(self, context, view):
    2630        self.context = context
    27         #self.url = view.url(context)
     31        self.url = view.url(context)
    2832        self.code = context.representation
    2933        self.history = context.history
Note: See TracChangeset for help on using the changeset viewer.