def index(): context = { 'posts': feeds.posts(), 'mpt_tweets': twitter.mpt_timeline(per_page=1), 'tag_tweets': twitter.tag_timeline(per_page=2), } return render_template('index.html', **context)
def feed(): posts = feeds.posts() context = { 'posts': posts, 'now': datetime.datetime.utcnow(), } resp = Response(render_template('feed.xml', **context)) resp.headers['Content-Type'] = 'application/rss+xml' return resp