def post(self, url): content = self.request.get("content") entry = Entry(subject=url, content=content) entry.put() time.sleep(0.1) self.redirect(url)
def get(self): entry = db.GqlQuery( "select * from Entry where subject='/' order by created desc").get() if entry: front_content = entry.content else: front_content = "<h1>Welcome to the Final!!!</h1>" entry = Entry(subject="/", content=front_content) entry.put() self.render("front.html", username=Account.valid_cookie( self), front_content=front_content, url="/")