Esempio n. 1
0
 def page(self, page):
     # Return a rendered template
     c.page = int(page)
     page = c.page - 1
     c.statuses = Session.query(Status).order_by(desc(Status.time)).offset(PER_PAGE * page).limit(PER_PAGE)
     return render('/status.mako')
Esempio n. 2
0
 def check(self):
     status = ("Ok" if is_bueda_up() else "Not Ok")
     status = Status(status=status)
     Session.add(status)
     Session.commit()
     return status.status
Esempio n. 3
0
 def index(self):
     # Return a rendered template
     c.statuses = Session.query(Status).order_by(desc(Status.time)).limit(PER_PAGE)
     c.page = 1
     return render('/status.mako')