</td> <td> {{ days_ago }} </td> <td> {{ daily_tweet_rate }} </td> </tr> """ row_template = Template(row_str) for member in get_ca_tweeters(): tid = member['twitter_id'].lower() profile = get_profile(tid) tweets = get_tweets(tid) days_ago = (datetime.today() - convert_twitter_timestamp(profile['created_at'])).days tweet_rate = round(profile['statuses_count'] / days_ago, 2) data = { "profile_pic_url": profile['profile_image_url'], "title": member['title'], "party": member['party'], "full_name": " ".join([member['firstname'], member['lastname']]), "twitter_id": tid, "followers_count": profile['followers_count'], "tweets_count": profile['statuses_count'], "days_ago": days_ago, "daily_tweet_rate": tweet_rate
</td> <td> {{ days_ago }} </td> <td> {{ daily_tweet_rate }} </td> </tr> """ row_template = Template(row_str) for member in get_ca_tweeters(): tid = member['twitter_id'].lower() profile = get_profile(tid) tweets = get_tweets(tid) days_ago = (datetime.today() - convert_twitter_timestamp(profile['created_at'])).days tweet_rate = round(profile['statuses_count'] / days_ago, 2) data = { "profile_pic_url" : profile['profile_image_url'], "title" : member['title'], "party" : member['party'], "full_name" : " ".join([member['firstname'], member['lastname']]), "twitter_id": tid, "followers_count": profile['followers_count'], "tweets_count": profile['statuses_count'], "days_ago": days_ago, "daily_tweet_rate": tweet_rate