# Filename: serve.py # Revision: 0.1 # # Copyright 2008 Christopher Myers and Justin Davis # # blogggg! server # Now, watch the hits come in! # # You have unlimited license to use this software however you want. There # is no warranty either expressed nor implied. Actually, we recommend not # using it. It just exists to prove a point. import post import cherrypy class MyBlog: def default(self, url): my_query = post.session.query(post.Entry) my_entry = my_query.filter_by(url=url).first() return my_entry.entry default.exposed = True cherrypy.quickstart(MyBlog())