]>
git.ipfire.org Git - people/ms/webapp.git/blob - application/handlers.py
7 class BaseHandler(tornado
.web
.RequestHandler
):
8 def get_current_user(self
):
9 return self
.get_secure_cookie("user")
12 return "%s" % socket
.gethostname()
16 return self
.application
.ldap
19 class MainHandler(BaseHandler
):
21 if not self
.current_user
:
22 self
.redirect("/login")
24 self
.redirect("/home")
27 class HomeHandler(BaseHandler
):
29 self
.render("base.html", title
="Testsite", slogan
="Security now!",
30 footer
=self
.footer(), user
=self
.current_user
)