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