def postCache(self, language, query):
        if query.getvalue('blog_post_id'):
            self.currentBlogPost = Blog.getPostById(query.getvalue('blog_post_id'))
        else:
            self.currentBlogPost = Blog.getLatestBlogPost()

        # Twitter feed
        ## http://api.twitter.com/1/statuses/user_timeline.json?screen_name=noradio
        twitterFeedUrl = "http://api.twitter.com/1/statuses/user_timeline.json?screen_name=fbonander&count=5&include_rts=true"
        result = urlfetch.fetch(url=twitterFeedUrl)
        if result.status_code == 200:
            self.twitterFeed = json.loads(result.content)
    def postCache(self, language, query):
        if query.getvalue('blog_post_id'):
            self.currentBlogPost = Blog.getPostById(
                query.getvalue('blog_post_id'))
        else:
            self.currentBlogPost = Blog.getLatestBlogPost()

        # Twitter feed
        ## http://api.twitter.com/1/statuses/user_timeline.json?screen_name=noradio
        twitterFeedUrl = "http://api.twitter.com/1/statuses/user_timeline.json?screen_name=fbonander&count=5&include_rts=true"
        result = urlfetch.fetch(url=twitterFeedUrl)
        if result.status_code == 200:
            self.twitterFeed = json.loads(result.content)
 def preRender(self, query):
     if query.getvalue('blog_post_id'):
         self.currentBlogPost = Blog.getPostById(
             query.getvalue('blog_post_id'))
     else:
         self.currentBlogPost = Blog.getLatestBlogPost()
 def preRender(self, query):
     if query.getvalue('blog_post_id'):
         self.currentBlogPost = Blog.getPostById(query.getvalue('blog_post_id'))
     else:
         self.currentBlogPost = Blog.getLatestBlogPost()