def display_page(slug): result = database.get_page(slug) if result[0]: page = dict(title=result[1][0], content=result[1][1]) return render_user_page('display_page.html', page=page) else: abort(404)
def display_article(slug): result = database.get_article(slug) if result[0]: article = dict(title=result[1][0], content=result[1][1], posted=format_dt(result[1][2])) return render_user_page('display_article.html', article=article) else: abort(404)
def display_post(post_id): result = database.get_post(post_id) if result[0]: post = dict(id=result[1][0], title=result[1][1], content=result[1][2], author=result[1][3], posted=format_dt(result[1][4]), parent=result[1][5], locked=result[1][6], children=get_children(result[1][0],config.NESTING)) return render_user_page('display_post.html', post=post) else: abort(404)