def get(self):
     #self.write('hih')
     blogs = [b for b in orm.Session().query(Blog).all()]#['1','2']
     user = get_user(self,orm.Session())
     name = 'Anonymous' if user is None else user.name
     self.render("blogindex.html",blogs = blogs,
             name=name,path=self.request.path)
 def get(self):
     session = appbase.orm.Session()
     user_obj = user.get_user(self, session)
     if user_obj is None:
         greeting = "Welcome, please sign in here: "
     else:
         greeting = "Hi " + user_obj.name + "! "
     self.render("index.html", title="A lean, mean kickstarter for Tornado.", greeting=greeting)
 def get(self):
     user = get_user(self,orm.Session())
     if user is None:
         user = dummy_user
     self.render('account.html',title='Account', greeting='Heyehey',
             user=user)