示例#1
0
文件: views.py 项目: pib/piblog
def index():
    posts = [page for page in pages if 'published' in page.meta]
    sorted_posts = sorted(posts,
                          reverse=True,
                          key=lambda page: page.meta['published'])
    return render_theme_template(get_current_theme(),
                                 'index.html',
                                 posts=sorted_posts)
示例#2
0
文件: views.py 项目: pib/piblog
def index():
    posts = [page for page in pages if 'published' in page.meta]
    sorted_posts = sorted(posts, reverse=True,
                          key=lambda page: page.meta['published'])
    return render_theme_template(get_current_theme(), 'index.html',
                                 posts=sorted_posts)
示例#3
0
文件: views.py 项目: pib/piblog
def post(path):
    page = pages.get_or_404(path)
    return render_theme_template(get_current_theme(), 'post.html', post=page)
示例#4
0
文件: views.py 项目: pib/piblog
def post(path):
    page = pages.get_or_404(path)
    return render_theme_template(get_current_theme(), 'post.html', post=page)