diff options
| -rw-r--r-- | pyramid/paster_templates/routesalchemy/+package+/configure.zcml | 18 | ||||
| -rw-r--r-- | pyramid/paster_templates/routesalchemy/+package+/run.py_tmpl | 5 |
2 files changed, 3 insertions, 20 deletions
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 @@ -<configure xmlns="http://pylonshq.com/pyramid"> - - <!-- this must be included for the view declarations to work --> - <include package="pyramid.includes" /> - - <route - pattern="" - name="home" - view=".views.my_view" - view_renderer="templates/mytemplate.pt" - /> - - <static - name="static" - path="templates/static" - /> - -</configure> 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() |
