Beispiel #1
0
 def post(self):
     username = self.request.get('username')
     password = self.request.get('password')
     
     # check login info against database
     u = User.login(username, password)
     if u:
         self.login(u)
         self.redirect('/blog')
     else:
         error_login = '******'
         self.render("login-form.html", error_login=error_login)