Exemplo n.º 1
0
def page(name):
    ''' Some page (such as about-me) '''
    data = PAGES.get(name, None)
    if data is None:
        abort(404)

    return render_template('page.html', data=data)
Exemplo n.º 2
0
def rebuild():
    PAGES.clear()
    POSTS.clear()
    CATEGORIES.clear()
    init_pages_posts(current_app.root_path)
    return '<pre>{}</pre> <hr/> <a href="/">Home</a>'.format('<br />'.join(POSTS.keys()))