def render(self, *args, **kwargs): app_id = args[0] user_id = args[1] mlayout = MLayout() layout_recs = mlayout.query_by_app(app_id, user_id) kwd = {'pager': '', 'tdesc': '', 'site_url': SITE_CFG['site_url']} return self.render_string('modules/map/map_layout.html', layout_recs=layout_recs, kwd=kwd)
class app_layout(tornado.web.UIModule): def render(self, app_id, user_id): self.mlayout = MLayout() layout_recs = self.mlayout.query_by_app(app_id, user_id) print(layout_recs.count()) kwd = { 'pager': '', 'tdesc': '', 'site_url': config.site_url, } return self.render_string('modules/map/map_layout.html', layout_recs = layout_recs, kwd=kwd)