mirror of
https://github.com/wassname/pyramid_formalchemy.git
synced 2026-06-27 16:10:40 +08:00
remove deprecation warning
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user