remove deprecation warning

This commit is contained in:
Gael Pasgrimaud
2011-08-27 16:46:21 +02:00
parent 7ae53d81dd
commit d26611fd70
3 changed files with 12 additions and 6 deletions
+4 -2
View File
@@ -11,8 +11,10 @@ def main(global_config, **settings):
initialize_sql(engine)
config = Configurator(settings=settings)
config.add_static_view('static', 'pyramidapp:static')
config.add_route('home', '/', view='pyramidapp.views.my_view',
view_renderer='templates/mytemplate.pt')
config.add_route('home', '/')
config.add_view('pyramidapp.views.my_view',
route_name='home',
renderer='templates/mytemplate.pt')
# pyramid_formalchemy's configuration
config.include('pyramid_formalchemy')
+4 -2
View File
@@ -11,8 +11,10 @@ def main(global_config, **settings):
initialize_sql(engine)
config = Configurator(settings=settings)
config.add_static_view('static', 'pyramidapp:static')
config.add_route('home', '/', view='pyramidapp.views.my_view',
view_renderer='templates/mytemplate.pt')
config.add_route('home', '/')
config.add_view('pyramidapp.views.my_view',
route_name='home',
renderer='templates/mytemplate.pt')
# pyramid_formalchemy's configuration
config.include('pyramid_formalchemy')
+4 -2
View File
@@ -28,8 +28,10 @@ def main(global_config, **settings):
authorization_policy=ACLAuthorizationPolicy())
config.add_static_view('static', 'pyramidapp:static')
config.add_route('home', '/', view='pyramidapp.views.my_view',
view_renderer='templates/mytemplate.pt')
config.add_route('home', '/')
config.add_view('pyramidapp.views.my_view',
route_name='home',
renderer='templates/mytemplate.pt')
# pyramid_formalchemy's configuration
config.include('pyramid_formalchemy')