def get(self, user_id=""): if user_id: posts = Post.by_user(long(user_id)) else: posts = Post.list_all() self.render('posts_list.html', posts=posts)