def tweets(self, user_id): db = cherrypy.request.db tweets = [] for mention in Mention.tweets(db, int(user_id)): tweets.append(mention.tweet) return tweets
def tweets(self, user_id): db = cherrypy.request.db tweets = {} for mention in Mention.tweets(db, int(user_id)): if mention.lang not in tweets: tweets[mention.lang] = [] tweets[mention.lang].append({'text': mention.tweet}) return tweets
def tweets(self, user_id): db = cherrypy.request.db tweets = {} for mention in Mention.tweets(db, int(user_id)): if mention.lang not in tweets: tweets[mention.lang] = [] tweets[mention.lang].append({ 'text': mention.tweet } ) return tweets