Exemplo n.º 1
0
 def get(self):
     if not is_login(self):
         self.response.set_cookie("redirect", "/admin")
         self.redirect("/admin/login")
     else:
         self.render(
             "admin.html",
             app_name=app_config["app-name"],
             account=AdminAccount.get(),
             people=Person.get_all(),
             months=Month.get_all(),
         )
Exemplo n.º 2
0
 def get(self, *args):
     """Render home page"""
     if args[0] is None:
         self.redirect("/home")
     else:
         self.render("home.html", months=Month.get_all(), page_title=self.PAGE_TITLE)