Paste #71
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | from google.appengine.ext import webapp from google.appengine.ext.webapp import util from google.appengine.ext import db class Category(db.Model): name = db.StringProperty() class Comment(db.Model): owner = db.ReferenceProperty() category = db.ReferenceProperty(Category) body = db.TextProperty(required=True) created = db.DateTimeProperty(auto_now_add=True) class MainHandler(webapp.RequestHandler): def get(self): self.response.out.write('Hello world!') def main(): application = webapp.WSGIApplication([('/', MainHandler)], debug=False) util.run_wsgi_app(application) if __name__ == '__main__': main() |