示例#1
0
def index(page):
    recent_posts = Post.get_recent(page)
    return render_template('general/index.html', posts=recent_posts)
示例#2
0
 def test_get_recent(self):
     post = self.create_post()
     self.assertEqual(len(Post.get_recent(1).items), 0)
     post.publish()
     self.assertEqual(len(Post.get_recent(1).items), 1)
示例#3
0
def index(page):
    recent_posts = Post.get_recent(page)
    return render_template('general/index.html', posts=recent_posts)