Example #1
0
def refresh_sidebar():
    group = request.args.get("focused_group", None)
    handle = connect()
    tweets = dumps(list(handle.collected_tweets.find()))
    organizedTweets = helpers.sortTweets(loads(tweets), session)
    focused_info = None
    for grouping in organizedTweets:
        if group == grouping["hashtagString"]:
            focused_info = grouping
    return render_template('sidebar-content.html', focus_group=focused_info)
Example #2
0
def index():
    getAPI()
    tweets = dumps(list(connect().collected_tweets.find()))
    organizedTweets = helpers.sortTweets(loads(tweets), session)
    return flask.render_template('index.html', groups=organizedTweets, focus_group=organizedTweets[0])
Example #3
0
def refresh():
    handle = connect()
    tweets = dumps(list(handle.collected_tweets.find()))
    organizedTweets = helpers.sortTweets(loads(tweets), session)
    return render_template('tweetcard.html', groups=organizedTweets)#, render_template('sidebar-content.html', focus_group=organizedTweets[0])