示例#1
0
    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'
        })
示例#2
0
文件: mobile.py 项目: tongsu/twitdao
    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"},
        )