Beispiel #1
0
 def post(self):
   self.clear_cookie("session_data")
   if 'email' not in self.request.arguments or 'password' not in self.request.arguments:
     self.redirect("/login/")
     return
   user = models.user.User(email=self.get_argument("email"), password=self.get_argument("password"))
   self.set_secure_cookie("session_data", user.get_session_data())
   self.redirect("/")
Beispiel #2
0
 def post(self):
   user = models.user.User(email=self.get_argument("email"), password=self.get_argument("password"), password2=self.get_argument("password"))
   self.set_secure_cookie("session_data", user.get_session_data())
   self.redirect("/")