Am Dienstag, den 07.03.2006, 09:06 -0700 schrieb Jeff Shell:
> On 3/6/06, Florian Lindner <[EMAIL PROTECTED]> wrote:
[...]
> 
>     # Get the default registration
>     default = context.getSiteManager()['default']
>     reg_manager = default.registrationManager
> 
>     if 'intid' not in default:
>         # There's a shorter way to do this, but I can never remember what it 
> is
>         intid = IntIds()
>         default['intid'] = intid
>         intids_reg = UtilityRegistration('', IIntIds, intid)
>         reg_manager.addRegistration(intids_reg)
>         intids_reg.status = ActiveStatus

The shorter way is:
zope.app.appsetup.bootstrap.ensureUtility(
                       context, IIntIds, '', IntIds, copy_to_zlog=False)


-- 
Mit freundlichen Grüßen

Michael Howitz

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to