def post(name): ''' Some post ''' post = POSTS.get(name, None) if post is None: abort(404) return render_template('post.html', post=post)
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()))
def home(): ''' Home ''' return render_template('home.html', pages=PAGES, posts=POSTS.values(), categories=CATEGORIES)