From f953e120363e618fa2cb8f1fd0c820cf1b9b3e55 Mon Sep 17 00:00:00 2001 From: Ben Bangert Date: Wed, 3 Nov 2010 21:09:53 -0700 Subject: Revert "Revert "Updated routesalchemy template to use imperative config."" This reverts commit 96d7897c0bc86c25afb861fb2ee61d5e4351b0dc. --- .../routesalchemy/+package+/configure.zcml | 18 ------------------ .../routesalchemy/+package+/run.py_tmpl | 5 +++-- 2 files changed, 3 insertions(+), 20 deletions(-) delete mode 100644 pyramid/paster_templates/routesalchemy/+package+/configure.zcml diff --git a/pyramid/paster_templates/routesalchemy/+package+/configure.zcml b/pyramid/paster_templates/routesalchemy/+package+/configure.zcml deleted file mode 100644 index 47adfbefb..000000000 --- a/pyramid/paster_templates/routesalchemy/+package+/configure.zcml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - diff --git a/pyramid/paster_templates/routesalchemy/+package+/run.py_tmpl b/pyramid/paster_templates/routesalchemy/+package+/run.py_tmpl index 695cd12fe..9edcd28c8 100644 --- a/pyramid/paster_templates/routesalchemy/+package+/run.py_tmpl +++ b/pyramid/paster_templates/routesalchemy/+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,9 @@ def app(global_config, **settings): initialize_sql(db_string, asbool(db_echo)) config = Configurator(settings=settings) config.begin() - config.load_zcml(zcml_file) + config.add_static_view('static', 'templates/static') + config.add_route('home', '/', view='.views.my_view', + renderer='templates/mytemplate.pt') config.end() return config.make_wsgi_app() -- cgit v1.2.3