def app_factory(global_settings, **local_settings): # pylint: disable=W0613 config = Configurator() config.setup_registry(settings=local_settings, root_factory=RootFactory()) # reg = get_current_registry() # repo_mgr = reg.getUtility(IRepositoryManager) # repo_mgr.initialize_all() return config.make_wsgi_app()
def app_factory(global_settings, **local_settings): # pylint: disable=W0613 reg = get_current_registry() config = Configurator(reg) config.setup_registry(settings=local_settings, root_factory=RootFactory()) zcml_file = local_settings.get("configure_zcml", "configure.zcml") config.load_zcml(zcml_file) return config.make_wsgi_app()
def app_factory(global_settings, **local_settings): # pylint: disable=W0613 config = Configurator() config.setup_registry(settings=local_settings, root_factory=RootFactory()) # reg = get_current_registry() # repo_mgr = reg.getUtility(IRepositoryManager) # repo_mgr.initialize_all() return config.make_wsgi_app()
def app_factory(global_settings, **local_settings): # pylint: disable=W0613 """ Default factory for creating a WSGI application using the everest configurator and root factory. :param dict global_settings: Global settings extracted from an ini file. Not used in this default app factory. :param dict local_settings: App settings extracted from an ini file. """ config = Configurator() config.setup_registry(settings=local_settings, root_factory=RootFactory()) if 'configure_zcml' in local_settings: config.load_zcml(local_settings['configure_zcml']) app = config.make_wsgi_app() # In the absence of an application name in the settings, we have to # extract the main app's name from the ini file, which unfortunately # means parsing it again. app_name = app_name_from_ini_file(global_settings['__file__']) ep_group = "%s.plugins" % app_name plugin_mgr = config.get_registered_utility(IPluginManager) plugin_mgr.load_all(ep_group) return app
def app_factory(global_settings, **local_settings): # pylint: disable=W0613 """ Default factory for creating a WSGI application using the everest configurator and root factory. :param dict global_settings: Global settings extracted from an ini file. Not used in this default app factory. :param dict local_settings: App settings extracted from an ini file. """ config = Configurator() config.setup_registry(settings=local_settings, root_factory=RootFactory()) if 'configure_zcml' in local_settings: config.load_zcml(local_settings['configure_zcml']) app = config.make_wsgi_app() # In the absence of an application name in the settings, we have to # extract the main app's name from the ini file, which unfortunately # means parsing it again. app_name = app_name_from_ini_file(global_settings['__file__']) ep_group = "%s.plugins" % app_name plugin_mgr = config.get_registered_utility(IPluginManager) plugin_mgr.load_all(ep_group) return app
def app_factory(global_settings, **local_settings): # pylint: disable=W0613 config = Configurator() config.setup_registry(settings=local_settings, root_factory=RootFactory()) return config.make_wsgi_app()
def app_factory(global_settings, **local_settings): # pylint: disable=W0613 config = Configurator() config.setup_registry(settings=local_settings, root_factory=RootFactory()) return config.make_wsgi_app()