From 84e445db4cce4d9f29bf76efa73291c48989267c Mon Sep 17 00:00:00 2001 From: Ben Bangert Date: Wed, 3 Nov 2010 16:45:40 -0700 Subject: Changed to use imperative config. --- .../alchemy/+package+/configure.zcml | 23 ---------------------- .../paster_templates/alchemy/+package+/run.py_tmpl | 7 +++++-- 2 files changed, 5 insertions(+), 25 deletions(-) delete mode 100644 pyramid/paster_templates/alchemy/+package+/configure.zcml diff --git a/pyramid/paster_templates/alchemy/+package+/configure.zcml b/pyramid/paster_templates/alchemy/+package+/configure.zcml deleted file mode 100644 index 9450b9049..000000000 --- a/pyramid/paster_templates/alchemy/+package+/configure.zcml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - diff --git a/pyramid/paster_templates/alchemy/+package+/run.py_tmpl b/pyramid/paster_templates/alchemy/+package+/run.py_tmpl index 610b9ed2d..2e349f482 100644 --- a/pyramid/paster_templates/alchemy/+package+/run.py_tmpl +++ b/pyramid/paster_templates/alchemy/+package+/run.py_tmpl @@ -9,7 +9,6 @@ def app(global_config, **settings): It is usually called by the PasteDeploy framework during ``paster serve``. """ - zcml_file = settings.get('configure_zcml', 'configure.zcml') db_string = settings.get('db_string') if db_string is None: raise ValueError("No 'db_string' value in application configuration.") @@ -17,7 +16,11 @@ def app(global_config, **settings): get_root = appmaker(db_string, asbool(db_echo)) config = Configurator(settings=settings, root_factory=get_root) config.begin() - config.load_zcml(zcml_file) + config.add_static_view('static', 'templates/static') + config.add_view('.views.view_root', context='.models.MyApp', + renderer="templates/root.pt") + config.add_view('.views.view_model', context='.models.MyModel', + renderer="templates/model.pt") config.end() return config.make_wsgi_app() -- cgit v1.2.3