Commits

Ralph Bean committed 37b7416

Use the latest in technique.

  • Participants
  • Parent commits 7451384

Comments (0)

Files changed (1)

File myapp/myapp/controllers/movie.py

     def movie(self, *args, **kw):
         w = MovieForm(redirect='/movie/').req()
         w.fetch_data(request)
-        mw = tw2.core.core.request_local()['middleware']
-        mw.controllers.register(w, 'movie_submit')
+        tw2.core.register_controller(w, 'movie_submit')
         return dict(widget=w, page='movie')
 
     @expose('myapp.templates.widget')
     def grid(self, *args, **kw):
-        mw = tw2.core.core.request_local()['middleware']
-        mw.controllers.register(GridWidget, 'db_jqgrid')
+        tw2.core.register_controller(GridWidget, 'db_jqgrid')
         return dict(widget=GridWidget, page='movie')