Ignore:
Timestamp:
17 Dec 2012, 08:05:40 (12 years ago)
Author:
Henrik Bettermann
Message:

Catch strange AttributeError?: "'module' object has no attribute 'index'" when importing the search function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/university/catalog.py

    r9631 r9805  
    1919"""
    2020import grok
     21from grok import index
    2122from hurry.query import Eq, Text
    2223from hurry.query.query import Query
     
    4041    grok.context(ICourse)
    4142
    42     code = grok.index.Field(attribute='code')
    43     title = grok.index.Text(attribute='title')
     43    code = index.Field(attribute='code')
     44    title = index.Text(attribute='title')
    4445
    4546class CertificatesIndexes(grok.Indexes):
     
    5051    grok.context(ICertificate)
    5152
    52     code = grok.index.Field(attribute='code')
    53     application_category = grok.index.Field(attribute='application_category')
    54     title = grok.index.Text(attribute='title')
     53    code = index.Field(attribute='code')
     54    application_category = index.Field(attribute='application_category')
     55    title = index.Text(attribute='title')
    5556
    5657class CertificateCoursesIndexes(grok.Indexes):
     
    6263    grok.context(ICertificateCourse)
    6364
    64     course_code = grok.index.Field(attribute='getCourseCode')
    65     level = grok.index.Field(attribute='level')
     65    course_code = index.Field(attribute='getCourseCode')
     66    level = index.Field(attribute='level')
    6667
    6768@grok.subscribe(ICourse, grok.IObjectAddedEvent)
Note: See TracChangeset for help on using the changeset viewer.