def get(self): cursor=self.param('cursor', default_value=None) default_token = md.get_default_access_token() tokens, cursor = md.get_user_access_tokens(users.get_current_user(), 10, cursor) self.render('settings.html', { 'default_token':default_token, 'tokens':tokens, 'cursor':cursor, 'where':'settings' })
def get(self, section): token = md.get_default_access_token() if not token: self.redirect("/settings") return cursor = self.param("cursor", default_value=None) tokens, cursor = md.get_user_access_tokens(users.get_current_user(), 10, cursor) td = Twitdao(token) token_user = td.users_show_by_id(user_id=token.user_id) self.render( "mobile/settings.html", {"token": token, "tokens": tokens, "token_user": token_user, "owner_user": token_user, "where": "settings"}, )