This method is called by get_content() method

def _format(self, posts):
        """ This method is called by get_content() method"""
        if posts.__class__ == Post:
            # format a single post
            return posts.dict()
        formated_posts = []
        for post in posts:
            formated_posts.append(post.dict())
        return formated_posts