diff options
| -rw-r--r-- | pyramid/config/zca.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pyramid/config/zca.py b/pyramid/config/zca.py index f27b2fb17..bcd5c31e3 100644 --- a/pyramid/config/zca.py +++ b/pyramid/config/zca.py @@ -1,5 +1,4 @@ from pyramid.threadlocal import get_current_registry -from zope.component import getSiteManager class ZCAConfiguratorMixin(object): def hook_zca(self): @@ -10,10 +9,12 @@ class ZCAConfiguratorMixin(object): :func:`zope.component.getAdapter` and others to use the :app:`Pyramid` :term:`application registry` rather than the Zope 'global' registry.""" + from zope.component import getSiteManager getSiteManager.sethook(get_current_registry) def unhook_zca(self): """ Call :func:`zope.component.getSiteManager.reset` to undo the action of :meth:`pyramid.config.Configurator.hook_zca`.""" + from zope.component import getSiteManager getSiteManager.reset() |
