Ejemplo n.º 1
0
def article(hash_id, slug):
    """
    Return content for an article
    """

    article = find_article_by_hash(articles, hash_id)

    return parse_template("article.html", article_data(article))
Ejemplo n.º 2
0
def index():
    """
    Return a list of all articles in RSS feed
    """

    sanitised_articles = [article_data(article) for article in articles]

    return parse_template("index.html", {"articles": sanitised_articles})