def home(): user = User.query.filter_by(id=g.user.id).first() user_twitter=TwitterFav() rslt=user_twitter.showTimeline(10) return render_template('info/hello.html', title="Hi %s" % (user.username), user=user, var=rslt)
def favorite_tweet(): logger.info("Start task") with celery.app.app_context(): tweet = TwitterFav() tweet.favoriteTweets() logger.info("Task finished: result")