From ed4a7dc107690978eb760af2bc1b13ca0d19e6f4 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 4 Nov 2010 00:38:48 -0400 Subject: use fully qualified dotted names --- pyramid/paster_templates/alchemy/+package+/run.py_tmpl | 6 ++++-- pyramid/paster_templates/routesalchemy/+package+/run.py_tmpl | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pyramid/paster_templates/alchemy/+package+/run.py_tmpl b/pyramid/paster_templates/alchemy/+package+/run.py_tmpl index 2e349f482..2a0eaa5b7 100644 --- a/pyramid/paster_templates/alchemy/+package+/run.py_tmpl +++ b/pyramid/paster_templates/alchemy/+package+/run.py_tmpl @@ -17,9 +17,11 @@ def app(global_config, **settings): config = Configurator(settings=settings, root_factory=get_root) config.begin() config.add_static_view('static', 'templates/static') - config.add_view('.views.view_root', context='.models.MyApp', + config.add_view('{{package}}.views.view_root', + context='{{package}}.models.MyApp', renderer="templates/root.pt") - config.add_view('.views.view_model', context='.models.MyModel', + config.add_view('{{package}}.views.view_model', + context='{{package}}.models.MyModel', renderer="templates/model.pt") config.end() return config.make_wsgi_app() diff --git a/pyramid/paster_templates/routesalchemy/+package+/run.py_tmpl b/pyramid/paster_templates/routesalchemy/+package+/run.py_tmpl index 9edcd28c8..c9e12a3fb 100644 --- a/pyramid/paster_templates/routesalchemy/+package+/run.py_tmpl +++ b/pyramid/paster_templates/routesalchemy/+package+/run.py_tmpl @@ -17,7 +17,7 @@ def app(global_config, **settings): config = Configurator(settings=settings) config.begin() config.add_static_view('static', 'templates/static') - config.add_route('home', '/', view='.views.my_view', + config.add_route('home', '/', view='{{package}}.views.my_view', renderer='templates/mytemplate.pt') config.end() return config.make_wsgi_app() -- cgit v1.2.3