{{cookiecutter.project_slug}}/{{cookiecutter.webapp_name}}/__init__.py
changeset 15 046513e8c864
parent 0 e4f314a62bbf
child 17 ac2ef0786756
equal deleted inserted replaced
14:e1cedcd80a4a 15:046513e8c864
    13 # import standard packages
    13 # import standard packages
    14 
    14 
    15 # import interfaces
    15 # import interfaces
    16 
    16 
    17 # import packages
    17 # import packages
       
    18 from pyams_utils.registry import set_local_registry, get_global_registry
    18 from pyramid.config import Configurator
    19 from pyramid.config import Configurator
    19 from zope.component import getGlobalSiteManager
       
    20 
       
    21 from pyams_utils.registry import set_local_registry
       
    22 
    20 
    23 
    21 
    24 def main(global_config, **settings):
    22 def main(global_config, **settings):
    25     """ This function returns a Pyramid WSGI application.
    23     """ This function returns a Pyramid WSGI application.
    26     """
    24     """
    27     registry = getGlobalSiteManager()
    25     registry = get_global_registry()
    28     set_local_registry(registry)
    26     set_local_registry(registry)
    29 
    27 
    30     config = Configurator(registry=registry)
    28     config = Configurator(registry=registry)
    31     config.setup_registry(settings=settings)
    29     config.setup_registry(settings=settings)
    32 
    30