Commits

Ralph Bean committed 6c7198b

Use the latest in technique.

  • Participants
  • Parent commits ee24202

Comments (0)

Files changed (1)

         'height': 'auto',
     }
 
-    def prepare(self):
-        # This controller registration does not generally have to occur inside
-        # 'prepare', but we place it here so we're sure the middleware has
-        # been initialized by tw2.core.dev_server before we make demands of it.
-        mw = tw2.core.core.request_local()['middleware']
-        mw.controllers.register(self.__class__, 'db_jqgrid')
-        super(GridWidget, self).prepare()
+tw2.core.register_controller(GridWidget, 'db_jqgrid')
 
 class Grid(tw2.core.Page):
     title = 'jQuery jqGrid'