[BlueBream] using catalog

Baiju M baiju.m.mail at gmail.com
Fri Sep 3 04:48:34 EDT 2010


On Fri, Sep 3, 2010 at 12:55 PM, Michael Howitz <mh at gocept.com> wrote:
> Am 03.09.2010 um 08:07 schrieb Baiju M:
>> On Fri, Sep 3, 2010 at 11:31 AM, Baiju M <baiju.m.mail at gmail.com> wrote:
>>> On Fri, Sep 3, 2010 at 11:16 AM, Baiju M <baiju.m.mail at gmail.com> wrote:
>>>> On Thu, Sep 2, 2010 at 9:05 PM, Ilshad Khabibullin <astoon.net at gmail.com> wrote:
>>>>> Hi,
>>>>>
>>>>> may be specify field_callable=False in index, default is True.
>>>>
>>>> I am not sure where to specify this option.
>>>>
>>>> In my project zope.intid & zope.catalog was not included
>>>> from ZCML (etc/site.zcml)
>>>> Now I added that but I am getting an error like this:
>>>> http://gist.github.com/563456
>>>
>>> This error was coming because "zope.location" was not included
>>> from ZCML.
>>
>> I am going to add "zope.location" to the default template.
>> Should we add "zope.intid" & "zope.catalog" also ?
>
> When you add zope.catalog, you should include zope.initid, too, as the former one relies on the latter one.
> And the intid utility must be installed before the first content object gets created so it gets an intid. Otherwise it will be difficult to add intids for the content objects later. See also https://bugs.launchpad.net/zope.catalog/+bug/189783

While setting up the site itself, I have added intid utility like this:

def setup_site_manager(context):
    context.setSiteManager(LocalSiteManager(context))
    sm = context.getSiteManager()

    uid = IntIds()
    context['uid'] = uid
    sm.registerUtility(removeSecurityProxy(uid), IIntIds, '')
    cat = Catalog()
    context['catalog'] = cat
    sm.registerUtility(removeSecurityProxy(cat), ICatalog, 'tccatalog')
    cat['summary'] = TextIndex('summary', ITicket)
    cat['number'] = TextIndex('number', ITicket)

At this time there is no ITicket object exists.

BTW, I have pushed all my code to "catalog" branch here:
http://github.com/bluebream/ticketcollector/tree/catalog

Regards,
Baiju M


More information about the bluebream mailing list