Exemplo n.º 1
0
def live_view(request):
    context_dict = {}
    context_dict['tab_live'] = True
    context_dict['num_tweets'] = settings.NUM_TWEETS
    context_dict['twitter_user'] = settings.TWITTER_USER
    
    tweets = ManageTwitter.get_tweets()
    context_dict['tweets'] = tweets
    
    posts = ManageBlog.get_all_blogs()
    context_dict['posts'] = posts
    context_dict['slice_num_post'] = "0:%s" % settings.NUM_LIVE_POSTS
    context_dict['slice_recent_post'] = "0:%s" % settings.NUM_LIVE_RECENT_POSTS
    #context_dict['slice_characters_per_post'] = "0:%s" % 500
    return render_to_response('main/live.html', context_dict, context_instance=RequestContext(request))
Exemplo n.º 2
0
 def handle_noargs(self, **options):
     ManageTwitter.update_tweets_cache()
     ManageBlog.update_blogs_cache()