equal
deleted
inserted
replaced
94 component = None |
94 component = None |
95 else: |
95 else: |
96 factory = None |
96 factory = None |
97 component = ob |
97 component = ob |
98 |
98 |
99 config = context.config.with_package(info.module) |
|
100 logger.debug("Registering portlet {0} named '{1}'".format( |
99 logger.debug("Registering portlet {0} named '{1}'".format( |
101 str(component) if component else str(factory), name)) |
100 str(component) if component else str(factory), name)) |
102 config.registry.registerUtility(component=component, factory=factory, |
101 config = context.config.with_package(info.module) |
103 provided=IPortlet, name=name) |
102 registry = settings.get('registry', config.registry) |
|
103 registry.registerUtility(component=component, factory=factory, |
|
104 provided=IPortlet, name=name) |
104 |
105 |
105 info = self.venusian.attach(wrapped, callback, category='pyams_portal', |
106 info = self.venusian.attach(wrapped, callback, category='pyams_portal', |
106 depth=depth + 1) |
107 depth=depth + 1) |
107 if info.scope == 'class': |
108 if info.scope == 'class': |
108 # if the decorator was attached to a method in a class, or |
109 # if the decorator was attached to a method in a class, or |