Updated global registry access
authorThierry Florac <tflorac@ulthar.net>
Thu, 08 Feb 2018 08:56:54 +0100
changeset 15 046513e8c864
parent 14 e1cedcd80a4a
child 16 00fd75ce868e
Updated global registry access
{{cookiecutter.project_slug}}/{{cookiecutter.webapp_name}}/__init__.py
--- a/{{cookiecutter.project_slug}}/{{cookiecutter.webapp_name}}/__init__.py	Sun Nov 26 09:28:55 2017 +0100
+++ b/{{cookiecutter.project_slug}}/{{cookiecutter.webapp_name}}/__init__.py	Thu Feb 08 08:56:54 2018 +0100
@@ -15,16 +15,14 @@
 # import interfaces
 
 # import packages
+from pyams_utils.registry import set_local_registry, get_global_registry
 from pyramid.config import Configurator
-from zope.component import getGlobalSiteManager
-
-from pyams_utils.registry import set_local_registry
 
 
 def main(global_config, **settings):
     """ This function returns a Pyramid WSGI application.
     """
-    registry = getGlobalSiteManager()
+    registry = get_global_registry()
     set_local_registry(registry)
 
     config = Configurator(registry=registry)