diff options
Diffstat (limited to 'repoze/bfg/paster_templates')
4 files changed, 8 insertions, 7 deletions
diff --git a/repoze/bfg/paster_templates/alchemy/+package+/run.py_tmpl b/repoze/bfg/paster_templates/alchemy/+package+/run.py_tmpl index 5eeaf1cba..7ef208c30 100644 --- a/repoze/bfg/paster_templates/alchemy/+package+/run.py_tmpl +++ b/repoze/bfg/paster_templates/alchemy/+package+/run.py_tmpl @@ -25,8 +25,8 @@ def app(global_config, **settings): if db_echo is None: db_echo = True get_root = appmaker(db_string, db_echo) + config = Configurator(settings=settings, root_factory=get_root) zcml_file = settings.get('configure_zcml', 'configure.zcml') - config = Configurator(settings=settings, root_factory=get_root, - zcml_file=zcml_file) + config.load_zcml(zcml_file) return config.make_wsgi_app() diff --git a/repoze/bfg/paster_templates/routesalchemy/+package+/run.py_tmpl b/repoze/bfg/paster_templates/routesalchemy/+package+/run.py_tmpl index e0e705224..b592e45a9 100644 --- a/repoze/bfg/paster_templates/routesalchemy/+package+/run.py_tmpl +++ b/repoze/bfg/paster_templates/routesalchemy/+package+/run.py_tmpl @@ -22,7 +22,8 @@ def app(global_config, **settings): if db_string is None: raise ValueError("No 'db_string' value in application configuration.") initialize_sql(db_string) + config = Configurator(settings=settings) zcml_file = settings.get('configure_zcml', 'configure.zcml') - config = Configurator(settings=settings, zcml_file=zcml_file) + config.load_zcml(zcml_file) return config.make_wsgi_app() diff --git a/repoze/bfg/paster_templates/starter/+package+/run.py_tmpl b/repoze/bfg/paster_templates/starter/+package+/run.py_tmpl index b7cd4b2c3..12d2a0719 100644 --- a/repoze/bfg/paster_templates/starter/+package+/run.py_tmpl +++ b/repoze/bfg/paster_templates/starter/+package+/run.py_tmpl @@ -5,7 +5,7 @@ def app(global_config, **settings): """ This function returns a repoze.bfg.router.Router object. It is usually called by the PasteDeploy framework during ``paster serve``""" + config = Configurator(root_factory=get_root, settings=settings) zcml_file = settings.get('configure_zcml', 'configure.zcml') - config = Configurator(root_factory=get_root, - settings=settings, zcml_file=zcml_file) + config.load_zcml(zcml_file) return config.make_wsgi_app() diff --git a/repoze/bfg/paster_templates/zodb/+package+/run.py_tmpl b/repoze/bfg/paster_templates/zodb/+package+/run.py_tmpl index 4fc20798d..c9023f822 100644 --- a/repoze/bfg/paster_templates/zodb/+package+/run.py_tmpl +++ b/repoze/bfg/paster_templates/zodb/+package+/run.py_tmpl @@ -14,7 +14,7 @@ def app(global_config, **settings): finder = PersistentApplicationFinder(zodb_uri, appmaker) def get_root(request): return finder(request.environ) + config = Configurator(root_factory=get_root, settings=settings) zcml_file = settings.get('configure_zcml', 'configure.zcml') - config = Configurator(root_factory=get_root, - settings=settings, zcml_file=zcml_file) + config.load_zcml(zcml_file) return config.make_wsgi_app() |
