Commits

Ralph Bean committed 47ed2ea

Use the latest in technique.

  • Participants
  • Parent commits c900ff8

Comments (0)

Files changed (1)

myapp/myapp/views.py

 
 def view_widget(context, request):
     context.fetch_data(request)
-    mw = tw2.core.core.request_local()['middleware']
-    mw.controllers.register(context, 'movie_submit')
+    tw2.core.register_controller(context, 'movie_submit')
     return {'widget':context}
 
 def view_grid_widget(context, request):
-    mw = tw2.core.core.request_local()['middleware']
-    mw.controllers.register(context, 'db_jqgrid')
+    tw2.core.register_controller(context, 'db_jqgrid')
     return {'widget':context}