Beispiel #1
0
def index():
    pagetitle = BLOGNAME + " - a blog about code, systems, and infosec."
    indexfooter = Widget("indexfooter")

    entries = get_post_list()

    return render_template("index.html", pagetitle=pagetitle,\
            blogname=BLOGNAME, entries=entries[0:INDEX_NUMPOSTS], indexfooter=indexfooter.get())
Beispiel #2
0
def atom_feed():
    feed = AtomFeed('Recent Posts', feed_url=request.url, url=request.url_root)
    articles = get_post_list(10, True)
    for article in articles:
        post = Post(article['postid'])
        feed.add(article["title"],
                 unicode(post.text),
                 content_type='html',
                 author="Edmond Burnett",
                 url=make_external("/post/" + article["postid"]),
                 updated=article["date"],
                 published=article["date"])
    return feed.get_response()
Beispiel #3
0
def archive():
    pagetitle = BLOGNAME + " - archive"
    entries = get_post_list(0, False)
    return render_template("archive.html", pagetitle=pagetitle,\
            blogname=BLOGNAME, entries=entries, postcount=len(entries))