Esempio n. 1
0
def post(name):
    ''' Some post '''

    post = POSTS.get(name, None)
    if post is None:
        abort(404)

    return render_template('post.html', post=post)
Esempio 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()))
Esempio n. 3
0
def home():
    ''' Home '''
    return render_template('home.html',
                           pages=PAGES,
                           posts=POSTS.values(),
                           categories=CATEGORIES)